From: Michael Welsh Duggan <mwd@md5i.com>
To: Davin Pearson <davin.pearson@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: How to highlight the offending line of code with edebug
Date: Fri, 23 Dec 2022 02:36:15 -0500 [thread overview]
Message-ID: <87ili2o9lc.fsf@md5i.com> (raw)
In-Reply-To: <83fsd68u3f.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 23 Dec 2022 09:20:04 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Davin Pearson <davin.pearson@gmail.com>
>> Date: Fri, 23 Dec 2022 10:13:33 +1300
>>
>> 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:
>
> 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.
--
Michael Welsh Duggan
(md5i@md5i.com)
next prev parent reply other threads:[~2022-12-23 7:36 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 [this message]
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=87ili2o9lc.fsf@md5i.com \
--to=mwd@md5i.com \
--cc=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).