Questions tagged [backtrace]
24 questions
13
votes
1 answer
Get backtrace from error programmatically
If an error is signalled in Emacs Lisp code, and debug-on-error is t, I get a backtrace buffer that makes it easy to figure out where the error occurred. However, for errors that occur while processing a response from the network asynchronously, it…

legoscia
- 6,012
- 29
- 54
9
votes
2 answers
Can emacs show formatted backtraces?
When getting an Elisp error and trying to debug the problem, the backtrace buffer is quite hard to read with its long lines.
Is there a way to get a pretty-printed backtrace buffer?

Tom
- 1,190
- 7
- 16
8
votes
1 answer
Can emacs auto-save backtrace?
Trying to debug a problem with debug-on-error. Backtrace appears for a second and then some other parts of the system make it disappear and emacs becomes dysfunctional so I can never read it.
Is there a way to get emacs to write the backtrace to a…

Michael Fox
- 211
- 1
- 4
7
votes
1 answer
Debug an elisp error - show call stack when an error occurs
I am relatively new to emacs / elisp, and am trying to build some custom functionality.
I have added a number of functions which are added to a major-mode.
Occasionally (and seemingly only after a long while of running), the following warning…

Steve Lorimer
- 545
- 4
- 13
5
votes
2 answers
What tools can help make the emacs debug output more readable?
I was expecting to find tools I can use to to e.g. prettify the stack trace, or e.g. show all variables that are bound at each level of the stack trace as you navigate, but haven't found anything. Do any tools to improve the debugging experience…

avv
- 1,563
- 10
- 24
5
votes
1 answer
Elisp backtrace print garbage messages
I'm using emacs 25.2 on osx 10.12 and following elisp intro to produce some error message intentionally.
(This is a list)
After I run C-x C-e on this line. A backtrace buffer appeared as supposed but with garbage error messages:
Debugger…

spacegoing
- 419
- 2
- 9
3
votes
1 answer
How does one access the actual arguments to an Emacs Lisp function from the `*Backtrace*`?
I am trying to debug a problem in some elisp and don't understand how to access the information I want from the Emacs Debugger.
Specifically, my backtrace looks like:
⋮
#f(compiled-function (hover) #)(#

Colin Fraizer
- 740
- 4
- 12
2
votes
1 answer
Line numbers in backtrace?
I'm working on debugging this backtrace (from Emacs bug #12145, shortened):
Debugger entered--Lisp error: (wrong-type-argument "markerp nil")
signal(wrong-type-argument ("markerp nil"))
tramp-error((tramp-file-name #("scp" 0 3 (tramp-default…

Thomas Koch
- 173
- 2
2
votes
1 answer
Break on all errors in edebug
How can I make Emacs break on an error, even if the error is being handled somewhere?
In my current scenario, the setup of a major mode is modifying the buffer and I want to find out why (and then fix it). I made a buffer read-only, ran edebug-defun…

Gilles 'SO- stop being evil'
- 21,702
- 4
- 53
- 89
2
votes
1 answer
escape or omit binary data in backtrace buffer?
Many times when I check the backtrace buffer, I can't copy the text out because of the embedded binary data (perhaps it's the internal null characters making the copy function think the string is shorter than it is?) so that when I try to copy the…

Jorge Israel Peña
- 1,265
- 9
- 17
1
vote
1 answer
Re-raise error after adding some context
I have a package that invokes some user-defined code that can be error-prone. For the most part, I'd like to respect the user's choices for handling errors, e.g. debug-on-error. However, due to some layers of indirection and the use of closures, it…

erjoalgo
- 853
- 1
- 5
- 18
1
vote
0 answers
How can I log output of debug into a file?
I am GNU Emacs 28.1.91 with native compilation. Emacs freezes so often, where I am unable to find what's is wrong. During the freeze all my work is always gone where the save does not occur.
Following: What do I do when Emacs is frozen? [duplicate],…

alper
- 1,238
- 11
- 30
1
vote
1 answer
"Invalid version list `(4 5 -4 414)'" when running `M-x package-list-packages`
When following a suggestion for solving another problem, I'm doing M-x package-list-packages. However, that gives me the error message Invalid version list `(4 5 -4 414)'. What does this mean, and what can I do about it?
If I do M-x…

HelloGoodbye
- 121
- 4
1
vote
1 answer
How to log backtrace to a file instead of popping it up and blocking following backtraces
With emacs if there is a backtrace buffer open, new backtrace is ignored. I find it is unconvenient when I am trying to find out which function/hook changes a variable. I use debug-watch as described in…

godblessfq
- 1,177
- 8
- 21
1
vote
0 answers
Get backtrace while busy
Something in my configuration causes emacs to occasionally hang or enter a very long busy loop. I have been adding things to my .emacs for several decades, so figuring out what the problem is by removing things is complicated, especially since I…

Troy Daniels
- 487
- 2
- 13