Debugging Elisp
To debug elisp programs, use Edebug.
Steps
Instrument the function to debug (i.e. add debugging symbols).
Cu C-M-x
(prefix +eval-defun
).Now, any call to the function pauses the interpreter and Edubg at the start of the function.
- Call the function.
- Pres
SPC
to step through forms.
Keys
b
Set a breakpointg
Execute until a breakpointq
Exit?
Help
Backtrace Buffer
+/-
Expand/contract (over multiple lines) the frame at point