diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/debugging.html | |
new repository
Diffstat (limited to 'devdocs/elisp/debugging.html')
| -rw-r--r-- | devdocs/elisp/debugging.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/devdocs/elisp/debugging.html b/devdocs/elisp/debugging.html new file mode 100644 index 00000000..3e7f2887 --- /dev/null +++ b/devdocs/elisp/debugging.html @@ -0,0 +1,39 @@ + <h2 class="chapter">Debugging Lisp Programs</h2> <p>There are several ways to find and investigate problems in an Emacs Lisp program. </p> <ul> <li> 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. </li> +<li> You can use Edebug, a source-level debugger for Emacs Lisp. </li> +<li> You can trace the execution of functions involved in the problem using the tracing facilities provided by the <samp>trace.el</samp> package. This package provides the functions <code>trace-function-foreground</code> and <code>trace-function-background</code> for tracing function calls, and <code>trace-values</code> for adding values of select variables to the trace. For the details, see the documentation of these facilities in <samp>trace.el</samp>. </li> +<li> If a syntactic problem is preventing Lisp from even reading the program, you can locate it using Lisp editing commands. </li> +<li> You can look at the error and warning messages produced by the byte compiler when it compiles the program. See <a href="compiler-errors">Compiler Errors</a>. </li> +<li> You can use the Testcover package to perform coverage testing on the program. </li> +<li> You can use the ERT package to write regression tests for the program. See <a href="https://www.gnu.org/software/emacs/manual/html_node/ert/index.html#Top">the ERT manual</a> in <cite>ERT: Emacs Lisp Regression Testing</cite>. </li> +<li> You can profile the program to get hints about how to make it more efficient. </li> +</ul> <p>Other useful tools for debugging input and output problems are the dribble file (see <a href="terminal-input">Terminal Input</a>) and the <code>open-termscript</code> function (see <a href="terminal-output">Terminal Output</a>). </p> <table class="menu" border="0" cellspacing="0"> <tr> +<td align="left" valign="top">• <a href="debugger" accesskey="1">Debugger</a> +</td> +<td> </td> +<td align="left" valign="top">A debugger for the Emacs Lisp evaluator. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="edebug" accesskey="2">Edebug</a> +</td> +<td> </td> +<td align="left" valign="top">A source-level Emacs Lisp debugger. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="syntax-errors" accesskey="3">Syntax Errors</a> +</td> +<td> </td> +<td align="left" valign="top">How to find syntax errors. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="test-coverage" accesskey="4">Test Coverage</a> +</td> +<td> </td> +<td align="left" valign="top">Ensuring you have tested all branches in your code. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="profiling" accesskey="5">Profiling</a> +</td> +<td> </td> +<td align="left" valign="top">Measuring the resources that your code uses. </td> +</tr> </table><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Debugging.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Debugging.html</a> + </p> +</div> |
