[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to highlight the offending line of code with edebug
From: |
Michael Welsh Duggan |
Subject: |
Re: How to highlight the offending line of code with edebug |
Date: |
Fri, 23 Dec 2022 02:36:15 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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)