Function: debug-watch
debug-watch is a function alias and interactive for
debug-on-variable-change, defined in debug.el.gz.
Signature
(debug-watch VARIABLE)
Documentation
Trigger a debugger invocation when VARIABLE is changed.
When called interactively, prompt for VARIABLE in the minibuffer.
This works by calling add-variable-watcher on VARIABLE. If you
quit from the debugger, this will abort the change (unless the
change is caused by the termination of a let-binding).
The watchpoint may be circumvented by C code that changes the
variable directly (i.e., not via set). Changing the value of
the variable (e.g., setcar on a list variable) will not trigger
watchpoint.
Use M-x cancel-debug-on-variable-change (cancel-debug-on-variable-change) to cancel the effect of
this command. Uninterning VARIABLE or making it an alias of
another symbol also cancels it.
Key Bindings