Showing content from https://www.gnu.org/software/emacs/manual/html_node/elisp/Debugging.html below:
Debugging (GNU Emacs Lisp Reference Manual)
Next: Reading and Printing Lisp Objects, Previous: Compilation of Lisp to Native Code, Up: Emacs Lisp [Contents][Index]
19 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 (see The 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. See Edebug.
- You can trace the execution of functions involved in the problem using the tracing facilities provided by the trace.el package. This package provides the functions
trace-function-foreground
and trace-function-background
for tracing function calls, and trace-values
for adding values of select variables to the trace. For the details, see the documentation of these facilities in trace.el.
- 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. See 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. See the ERT manual in ERT: Emacs Lisp Regression Testing.
- You can profile the program to get hints about how to make it more efficient. See Profiling.
Other useful tools for debugging input and output problems are the dribble file (see Terminal Input) and the open-termscript
function (see Terminal Output).
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4