[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is it so difficult to get a Lisp backtrace?

From: Lars Ingebrigtsen
Subject: Re: Why is it so difficult to get a Lisp backtrace?
Date: Sat, 25 Jun 2022 17:35:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Alan Mackenzie <acm@muc.de> writes:

>> This third group of users is poorly catered for by the current collection
>> of mechanisms.  See also bug #56201, with thanks to Andreas and Lars who
>> helped me get to the bottom of it.  To be reasonably sure of getting a
>> backtrace, it seems one needs to do all of the following:
>> (i) (setq debug-on-error t).
>> (ii) (setq debug-on-signal t).
>> (iii) Bind debug-ignored-errors to nil.
>> (iv) Pray.

You probably also need to ensure that inhibit-redisplay is nil at the
point of the error, I think?  (At least I vaguely recall having to
remove some of those bindings to get a backtrace...)

> I mean something like the following, which to a first approximation,
> works.  To use it, do M-x debug-next-command and the execute the command
> expected to give errors:

I like it, but it may not be useful in all contexts -- errors are used
as a programming mechanism here and there (i.e., throwing an error
symbol to be caught by the caller), and you'll get backtraces from these
non-error errors, too, unfortunately.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]