diff options
Diffstat (limited to 'devdocs/elisp/variable-debugging.html')
| -rw-r--r-- | devdocs/elisp/variable-debugging.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/devdocs/elisp/variable-debugging.html b/devdocs/elisp/variable-debugging.html new file mode 100644 index 00000000..96cc3793 --- /dev/null +++ b/devdocs/elisp/variable-debugging.html @@ -0,0 +1,12 @@ + <h4 class="subsection">Entering the debugger when a variable is modified</h4> <p>Sometimes a problem with a function is due to a wrong setting of a variable. Setting up the debugger to trigger whenever the variable is changed is a quick way to find the origin of the setting. </p> <dl> <dt id="debug-on-variable-change">Command: <strong>debug-on-variable-change</strong> <em>variable</em> +</dt> <dd> +<p>This function arranges for the debugger to be called whenever <var>variable</var> is modified. </p> <p>It is implemented using the watchpoint mechanism, so it inherits the same characteristics and limitations: all aliases of <var>variable</var> will be watched together, only dynamic variables can be watched, and changes to the objects referenced by variables are not detected. For details, see <a href="watching-variables">Watching Variables</a>. </p> +</dd> +</dl> <dl> <dt id="cancel-debug-on-variable-change">Command: <strong>cancel-debug-on-variable-change</strong> <em>&optional variable</em> +</dt> <dd><p>This function undoes the effect of <code>debug-on-variable-change</code> on <var>variable</var>. When called interactively, it prompts for <var>variable</var> in the minibuffer. If <var>variable</var> is omitted or <code>nil</code>, it cancels break-on-change for all variables. Calling <code>cancel-debug-on-variable-change</code> does nothing to a variable which is not currently set up to break on change. </p></dd> +</dl><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/Variable-Debugging.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Variable-Debugging.html</a> + </p> +</div> |
