The builtin elisp debugger (i.e. the regular one, debug
, not edebug) has a default binding of s
to command backtrace-goto-source
.
When I try to use it, it says: Source code location not known
You can see what I mean by doing this:
- Set contents of
/tmp/blah.el
to be:
(defun abc ()
(error "hello"))
Run the command
emacs -Q --eval '(progn (setq debug-on-error t) (load-file "/tmp/blah.el") (abc))'
Highlight fourth line in buffer, the one that reads
abc()
Press
s
key, the error saysSource code location not known
The docs for backtrace-goto-source
say:
If its location is known, jump to the source code for the frame at point
I checked the builtin info documentation for section 18.1 The Lisp Debugger, but i couldn't really find a setting for what i want. How do I make a symbol's location known to the debugger so it jumps to the source location when I press s?
Interesting note: the behavior of pressing mouse-1 is completely different from pressing s, and sometimes navigates to bundled source location gzs for me, but also sometimes opens an "Open File" dialog (GUI).