diff options
Diffstat (limited to 'devdocs/elisp/source-breakpoints.html')
| -rw-r--r-- | devdocs/elisp/source-breakpoints.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/devdocs/elisp/source-breakpoints.html b/devdocs/elisp/source-breakpoints.html new file mode 100644 index 00000000..64b894a2 --- /dev/null +++ b/devdocs/elisp/source-breakpoints.html @@ -0,0 +1,12 @@ + <h4 class="subsubsection">Source Breakpoints</h4> <p>All breakpoints in a definition are forgotten each time you reinstrument it. If you wish to make a breakpoint that won’t be forgotten, you can write a <em>source breakpoint</em>, which is simply a call to the function <code>edebug</code> in your source code. You can, of course, make such a call conditional. For example, in the <code>fac</code> function, you can insert the first line as shown below, to stop when the argument reaches zero: </p> <div class="example"> <pre class="example">(defun fac (n) + (if (= n 0) (edebug)) + (if (< 0 n) + (* n (fac (1- n))) + 1)) +</pre> +</div> <p>When the <code>fac</code> definition is instrumented and the function is called, the call to <code>edebug</code> acts as a breakpoint. Depending on the execution mode, Edebug stops or pauses there. </p> <p>If no instrumented code is being executed when <code>edebug</code> is called, that function calls <code>debug</code>. </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/Source-Breakpoints.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Source-Breakpoints.html</a> + </p> +</div> |
