Skip to content

Commit c6f9f73

Browse files
committed
patch 8.0.1505: debugger can't break on a condition
Problem: Debugger can't break on a condition. (Charles Campbell) Solution: Add ":breakadd expr". (Christian Brabandt, closes #859)
1 parent c33ecb2 commit c6f9f73

10 files changed

Lines changed: 460 additions & 261 deletions

File tree

runtime/doc/repeat.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,19 @@ DEFINING BREAKPOINTS
806806
< Note that this only works for commands that are executed when
807807
sourcing the file, not for a function defined in that file.
808808

809+
:breaka[dd] expr {expression}
810+
Sets a breakpoint, that will break whenever the {expression}
811+
evaluates to a different value. Example: >
812+
:breakadd expr g:lnum
813+
814+
< Will break, whenever the global variable lnum changes.
815+
Note if you watch a |script-variable| this will break
816+
when switching scripts, since the script variable is only
817+
valid in the script where it has been defined and if that
818+
script is called from several other scripts, this will stop
819+
whenever that particular variable will become visible or
820+
unaccessible again.
821+
809822
The [lnum] is the line number of the breakpoint. Vim will stop at or after
810823
this line. When omitted line 1 is used.
811824

0 commit comments

Comments
 (0)