@@ -1057,6 +1057,28 @@ then answer `Y` to that (for example).
10571057You can configure your choices in the ` .vimspector.json ` . See
10581058[ the configuration guide] [ vimspector-ref-exception ] for details on that.
10591059
1060+ ### Data breakpoints
1061+
1062+ Data breakpoints are not supported by all debug adapters. They are breakpoints
1063+ which trigger when some memory is read or written. They can be created:
1064+
1065+ - For a given variable in the variables window (` <F9> ` on variable)
1066+ - For a given child variable in the watches or variables windows
1067+ (` <F9> ` on child variable)
1068+ - For an arbitrary expression which evaluates to an address (` <F9> ` in watch
1069+ window, not on any variable)
1070+
1071+ When specifying an expression, you can also specify a size.
1072+
1073+ In general, if you hit ` <F9> ` (or whatever mapping you have) in the Variables or
1074+ Watch window, you'll be adding a Data Breakpoint. If the context looks like a
1075+ variable, then Vimspector will ask the debug adapter to create a data breakpoint
1076+ on that variable expression. Otherwise, you'll be asked to enter an expression,
1077+ or an address and a size, depending on the capabilities of the debugger.
1078+
1079+ NOTE: Not all debug adapters support data breakpoints, and the ability to
1080+ actually create them often depends on the hardware of the target.
1081+
10601082### API Summary
10611083
10621084*** NOTE:*** Previously, ToggleBreakpoint would cycle between 3 states:
@@ -1082,6 +1104,7 @@ deletes a breakpoint. If you wish to 'disable' breakpoints, use the
10821104* ` call vimspector#ListBreakpoints() ` - toggle breakpoints window
10831105* ` call vimspector#BreakpointsAsQuickFix() ` - return the current set of
10841106 breakpoints in vim quickfix format
1107+ * ` call vimspector#AddDataBreakpoint() ` - add a data breakpoint
10851108
10861109Examples:
10871110
@@ -1209,6 +1232,7 @@ autocmd SessionLoadPost * silent! VimspectorLoadSession
12091232* View the type of the variable via mouse hover.
12101233* When changing the stack frame the locals window updates.
12111234* While paused, hover to see values.
1235+ * Create a data breakpoint with ` <F9> ` .
12121236
12131237![ locals window] ( https://puremourning.github.io/vimspector-web/img/vimspector-locals-window.png )
12141238
@@ -1259,6 +1283,7 @@ to add a new watch expression.
12591283* Set the value of the variable with ` <C-CR> ` (control + ` <CR> ` ) or
12601284 ` <leader><CR> ` (if ` modifyOtherKeys ` doesn't work for you)
12611285* Delete with ` <DEL> ` .
1286+ * Create a data breakpoint with ` <F9> ` .
12621287
12631288![ watch window] ( https://puremourning.github.io/vimspector-web/img/vimspector-watch-window.png )
12641289
0 commit comments