elisp: Debugging
17 Debugging Lisp Programs
**************************
There are several ways to find and investigate problems in an Emacs Lisp
program.
• If a problem occurs when you run the program, you can use the
built-in Emacs Lisp debugger to suspend the Lisp evaluator, and
examine and/or alter its internal state.
• You can use Edebug, a source-level debugger for Emacs Lisp.
• If a syntactic problem is preventing Lisp from even reading the
program, you can locate it using Lisp editing commands.
• You can look at the error and warning messages produced by the byte
compiler when it compiles the program. Compiler Errors.
• You can use the Testcover package to perform coverage testing on
the program.
• You can use the ERT package to write regression tests for the
program. the ERT manual (ert)Top.
• You can profile the program to get hints about how to make it more
efficient.
Other useful tools for debugging input and output problems are the
dribble file (Terminal Input) and the ‘open-termscript’ function
(Terminal Output).
Menu