Next: Explicit Debug, Previous: Function Debugging, Up: Debugger
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.
This function arranges for the debugger to be called whenever variable is modified.
It is implemented using the watchpoint mechanism, so it inherits the same characteristics and limitations: all aliases of variable will be watched together, only dynamic variables can be watched, and changes to the objects referenced by variables are not detected. For details, see Watching Variables.
This function undoes the effect of
debug-on-variable-change
on variable. When called interactively, it prompts for variable in the minibuffer. If variable is omitted ornil
, it cancels break-on-change for all variables. Callingcancel-debug-on-variable-change
does nothing to a variable which is not currently set up to break on change.