From: Eli Zaretskii <eliz@gnu.org>
To: Michael Welsh Duggan <mwd@md5i.com>
Cc: davin.pearson@gmail.com, emacs-devel@gnu.org
Subject: Re: How to highlight the offending line of code with edebug
Date: Fri, 23 Dec 2022 10:39:50 +0200 [thread overview]
Message-ID: <83zgbe7bu1.fsf@gnu.org> (raw)
In-Reply-To: <87ili2o9lc.fsf@md5i.com> (message from Michael Welsh Duggan on Fri, 23 Dec 2022 02:36:15 -0500)
> From: Michael Welsh Duggan <mwd@md5i.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 23 Dec 2022 02:36:15 -0500
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> How do I invoke the edebug debugger when you get an error:
> >
> > I don't think you can. Edebug requires that you instrument the
> > function(s) you want to debug in advance.
>
> An approach to this is to use `M-x toggle-debug-on-error` and then run
> the offending command. That will get you a backtrace with which you can
> determine what function it is actually failing within. Then you can
> instrument that function with edebug, toggle debug-on-error again, and
> run again.
Yes, that's what everyone does. But note that even after
instrumenting the offending function, there's AFAIK no way of asking
Edebug to kick in only when the error happens. Instead, you need to
step through the function and see where it signals an error.
next prev parent reply other threads:[~2022-12-23 8:39 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
2022-12-23 7:20 ` Eli Zaretskii
2022-12-23 7:36 ` Michael Welsh Duggan
2022-12-23 8:39 ` Eli Zaretskii [this message]
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=83zgbe7bu1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=davin.pearson@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=mwd@md5i.com \
/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).