GNU Info

Info Node: (elisp)Debugging

(elisp)Debugging


Next: Read and Print Prev: Advising Functions Up: Top
Enter node , (file) or (file)node

Debugging Lisp Programs
***********************

   There are three ways to investigate a problem in an Emacs Lisp
program, depending on what you are doing with the program when the
problem appears.

   * If the problem occurs when you run the program, you can use a Lisp
     debugger to investigate what is happening during execution.  In
     addition to the ordinary debugger, Emacs comes with a source level
     debugger, Edebug.  This chapter describes both of them.

   * If the problem is syntactic, so that Lisp cannot even read the
     program, you can use the Emacs facilities for editing Lisp to
     localize it.

   * If the problem occurs when trying to compile the program with the
     byte compiler, you need to know how to examine the compiler's
     input buffer.

Debugger
How the Emacs Lisp debugger is implemented.
Edebug
A source-level Emacs Lisp debugger.
Syntax Errors
How to find syntax errors.
Compilation Errors
How to find errors that show up in byte compilation.
   Another useful debugging tool is the dribble file.  When a dribble
file is open, Emacs copies all keyboard input characters to that file.
Afterward, you can examine the file to find out what input was used.
Note: Terminal Input.
   For debugging problems in terminal descriptions, the
`open-termscript' function can be useful.  Note: Terminal Output.


automatically generated by info2www version 1.2.2.9