Skip to content
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

Enable debug adaptors to enable/disable certain breakpoint types #155

Closed
auchenberg opened this issue Jan 28, 2018 · 4 comments
Closed

Enable debug adaptors to enable/disable certain breakpoint types #155

auchenberg opened this issue Jan 28, 2018 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@auchenberg
Copy link

From @auchenberg on January 28, 2018 2:6

This is a part of a series of requests to enable "custom breakpoints" support in VS Code. See microsoft/vscode#38568

Scenario:
I as a developer connect VS Code to a remote production instance to do remote debugging. In this scenario the debug adaptor detects that it's connected to a production instance where a regular breakpoints can have side effects such as halting execution.

Request:
The Debug Adaptor should be able to decide which breakpoint types that should be enabled for a given session. In the above scenario regular breakpoints could be disabled, and a new production-optimized breakpoint type should be enabled.

I imagine a mechanism in the Debug Protocol is needed for this.

Copied from original issue: microsoft/vscode#42264

@auchenberg
Copy link
Author

After lookling into https://github.com/Microsoft/vscode-debugadapter-node/blob/master/protocol/src/debugProtocol.ts#L1033, it looks like the change needed here is the capability to disable "regular" breakpoints.

@roblourens
Copy link
Member

Disabling individual regular breakpoints doesn't show up in the protocol, but it's implemented in vscode by just "removing" the disabled breakpoints. So I think it's possible that this could be a client-side feature- if all logpoints are disabled, vscode can tell the adapter that all logpoints are removed. I think the protocol will still need to know that different types of breakpoints exist though.

@auchenberg
Copy link
Author

Doing this client side wouldn't disable the option in the VS Code UI, right? If regular breakpoints are disabled, you shouldn't be able to set them in the UI.

@weinand
Copy link
Contributor

weinand commented Oct 19, 2021

Breakpoints exist independent of debug sessions and can be created at any time. Since breakpoints do not belong to a specific debugger, it does not make sense that a debug adapter/extension has control over a specific breakpoint type in order to disable their creation.

If a debug adapter is connected to a production debuggee, it can either filter breakpoints with side affects or convert them into "logpoints" without side affects.

@weinand weinand closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants