unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Davin Pearson <davin.pearson@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: How to highlight the offending line of code with edebug
Date: Fri, 23 Dec 2022 10:13:33 +1300	[thread overview]
Message-ID: <CAG9ihEvwx01mNLOUMQX9s=kVpXnin3z4AvCDkfdeRQj0okuJRg@mail.gmail.com> (raw)
In-Reply-To: <CAG9ihEuW21wfTwq8WfRXn474r72yjSVPA72zQ3zL6=fWKDkcFg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

I have fixed a bug in an earlier email where (foo) was called
before foo was defined.

When I write the following code:

(progn
  (setq edebug-on-error t)
  (setq edebug-all-defs t))

(defun foo ()
  tomcat
  )
(foo)

How do I invoke the edebug debugger when you get an error:

Symbol’s value as variable is void: tomcat

I want the debugger to point to the offending line of code,
in this case tomcat.

The way that I currently find errors such as these is to put
checkpoints on every second line except the last line of defuns.
However this approach is rather cumbersome as I have to add a lot
of checkpoints and then remove them when I find the bug.

*Davin.*

[-- Attachment #2: Type: text/html, Size: 914 bytes --]

  reply	other threads:[~2022-12-22 21:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 21:09 How to highlight the offending line of code with edebug Davin Pearson
2022-12-22 21:13 ` Davin Pearson [this message]
2022-12-23  7:20   ` Eli Zaretskii
2022-12-23  7:36     ` Michael Welsh Duggan
2022-12-23  8:39       ` Eli Zaretskii
2022-12-26  0:54         ` Davin Pearson
2022-12-26 12:29           ` Eli Zaretskii
2023-01-02  0:27             ` Davin Pearson
2023-01-02 11:57               ` Eli Zaretskii
2023-01-02 22:11                 ` Davin Pearson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG9ihEvwx01mNLOUMQX9s=kVpXnin3z4AvCDkfdeRQj0okuJRg@mail.gmail.com' \
    --to=davin.pearson@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).