-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "breakpoint created/deleted" notifications. #8642
Comments
@vadimcn the protocol has already a BreakpointEvent for this. Please see: https://github.com/Microsoft/vscode-debugadapter-node/blob/master/protocol/src/debugProtocol.ts#L135 @isidorn are you already tracking this event? |
@weinand: But does VSCode support creation/deleteion? Sending a BreakpointEvent with reason = 'new' doesn't seem to have any effect. |
Also, please note that currently the Breakpoint does not provide a way to preserve custom information (such as condition, hit count, etc) across debugging sessions. |
Assigning first to @weinand since this needs a couple of more additions to the protocol:
Once that is done we just need to handle those events here for which a pull request is welcome @vadimcn. |
Hey guys, the PowerShell extension is really in need of this behavior now since we're able to interactively debug PowerShell scripts using our new Integrated Console feature. I've started trying to implement the add/delete behavior for BreakpointEvent in debugService so that I can send you a PR for it to go into the release at the beginning of June. Once I get something basic working I'll send a WIP PR so we can discuss the implementation. I also noticed the lack of support for the debugger sending condition and function breakpoints to the client. Is that something we could potentially add to the protocol soon? Any way I could help with that? |
After discussing with @weinand we decided to introduce 3 different breakpoint events For compatibiliy reason if a breakpoint event has no |
Now vscode will react to breakpoint events. Unassigning myself and assigning to @weinand to update the protocol and @roblourens to adopt this in node-debug2 adapter. @daviwil please try it out and let me know how it goes |
For verifying this feature, I've added two REPL command to mock-debug:
I found these issues:
And maybe unrelated: |
@weinand thanks for verifying and for nicely updating the mock debug so this is easy to try out. |
Now its working fine. |
Some debuggers have much more flexible ways of setting breakpoints than VSCode currently supports (e.g. set breakpoints by regex). Would be nice if breakpoints created via commands in debugger console were reflected in the UI.
I'd suggest adding a new notification message to the protocol, which adapter can send when a breakpoint is created/deleted. It should include a "cookie" that needs to be passed back to the adapter in order to re-create the breakpoint.
The text was updated successfully, but these errors were encountered: