summaryrefslogtreecommitdiff
path: root/devdocs/elisp/explicit-debug.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/explicit-debug.html
new repository
Diffstat (limited to 'devdocs/elisp/explicit-debug.html')
-rw-r--r--devdocs/elisp/explicit-debug.html6
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 &copy; 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>