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.  SeeCompiler 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.  Seethe 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 (SeeTerminal Input) and the ‘open-termscript’ function
 (SeeTerminal Output).
 

Menu