microsoft / vscode-mock-debug

Starter sample for developing debug adapters for VSCode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo of data breakpoints has a mistake

itowlson opened this issue · comments

The intent of the data breakpoints sample is that the user should be able to set a data breakpoint on one of the (mock) globals but not the locals. However with the current code the "Break when value changes" command never appears.

The reason is that in the mockDebug.dataBreakpointInfoRequest method at https://github.com/microsoft/vscode-mock-debug/blob/master/src/mockDebug.ts#L380, the code tests if the breakpoint candidate is global by checking if the variable handle starts with global_. The mock globals' names start with global_ but the handle for all globals is global. The if statement should read if (id === "global").