Debugger mode is the mode used in the BacktraceBuffer (buffer
‘C-h m’ there to see descriptions of the important debugger keys, which include
‘c’ (current sexp)
‘d’ (single step),
‘e’ (eval another sexp that you input), and
‘q’ (quit). (
‘C-h m’ always gives you information on the current mode, whatever it might be.)
‘M-x debug-on-entry’to put breakpoints at the start of functions, and
‘M-x cancel-debug-on-entry’to remove them.
(debug)in EmacsLisp code at arbitrary points (and then eval that code) to put breakpoints at those places.
‘C-g’. This is useful in debugging infinite loops and long delays. You can toggle this variable using
‘M-x toggle-debug-on-error’. Note that some errors are ignored – you may have to temporarily set
‘nil’in order to debug such errors.
‘debug-on-error’. It shows trace buffers instead of entering the debugger. Example:
(setq stack-trace-on-error '(buffer-read-only))
In addition to debugger-mode there is also Edebug. See SourceLevelDebugger for more information.