diff options
Diffstat (limited to 'devdocs/elisp/explicit-debug.html')
| -rw-r--r-- | devdocs/elisp/explicit-debug.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/devdocs/elisp/explicit-debug.html b/devdocs/elisp/explicit-debug.html new file mode 100644 index 00000000..505342f6 --- /dev/null +++ b/devdocs/elisp/explicit-debug.html @@ -0,0 +1,6 @@ + <h4 class="subsection">Explicit Entry to the Debugger</h4> <p>You can cause the debugger to be called at a certain point in your program by writing the expression <code>(debug)</code> at that point. To do this, visit the source file, insert the text ‘<samp>(debug)</samp>’ at the proper place, and type <kbd>C-M-x</kbd> (<code>eval-defun</code>, a Lisp mode key binding). <strong>Warning:</strong> if you do this for temporary debugging purposes, be sure to undo this insertion before you save the file! </p> <p>The place where you insert ‘<samp>(debug)</samp>’ must be a place where an additional form can be evaluated and its value ignored. (If the value of <code>(debug)</code> isn’t ignored, it will alter the execution of the program!) The most common suitable places are inside a <code>progn</code> or an implicit <code>progn</code> (see <a href="sequencing">Sequencing</a>). </p> <p>If you don’t know exactly where in the source code you want to put the debug statement, but you want to display a backtrace when a certain message is displayed, you can set <code>debug-on-message</code> to a regular expression matching the desired message. </p><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/Explicit-Debug.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Explicit-Debug.html</a> + </p> +</div> |
