[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: Stefan Monnier
Subject: Re: Why is it so difficult to get a Lisp backtrace?
Date: Sun, 26 Jun 2022 04:45:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> 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.
> (v) Execute the erring command again.

As discussed further in the thread another related problem is those
errors which happen in contexts where we can't popup the debugger.

I've been thinking recently that every time an error is raised, we
should stash the backtrace into some fixed-size table.

This way, when an error happens, you don't need to do steps i..v at all,
you just go and consult the recent backtraces.

I'm not sure I'd do that for all those signals which are caught (just like
I'm not sure step ii should be there in your recipe), but I'd definitely
do that for those errors caught by `with-demoted-errors`.


reply via email to

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