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

Support Data Breakpoints across sessions #195151

Open
KutluOzel-b opened this issue Oct 9, 2023 · 4 comments · May be fixed by #226735
Open

Support Data Breakpoints across sessions #195151

KutluOzel-b opened this issue Oct 9, 2023 · 4 comments · May be fixed by #226735
Assignees
Labels
api-proposal debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@KutluOzel-b
Copy link

We are implementing a debugger extension, which is working as a remote debugger.
While implementing data breakpoints feature, we found out there is no source binding approach and programatically control over data breakpoints which causes multiple problems.

To resolve those issues we need a support for ;

  • Data breakpoints can be created / removed programatically.
  • Source bound (although we can achieve this with dataId generated by dataBreakpointInfo method on DAP, it would be much better to manage if they are alike line breakpoints considering complexity of the methods while multiple sesions active.
@KutluOzel-b
Copy link
Author

Since the feature is not yet planned nor considered yet, we offer to contribute to it...

There will be an implementation of adding DataBreakpoints class to vscode api declaration file like :

export class DataBreakpoint extends Breakpoint {
		readonly dataId: string;
		readonly accessType: DebugProtocol.DataBreakpointAccessType;
		/**
		 * Create a new data breakpoint.
		 */
		constructor(dataId: string, accessType: DebugProtocol.DataBreakpointAccessType, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string);
	}

So we can use it when calling addBreakpoint method in vscode debug api.

And with the help of databreakpointrenderer and addDataBreakpoint method, which is already on debug model, we can create DataBreakpoints programmatically when we are developing our extension.

Didn't tried the rest but I think it will be stored and can be obtained with the storage service and the rest is looking available and nothing much needs to be done to make it line sourceBreakpoints function breakpoints which can be created programmatically.

Any feedback on this ?

@roblourens roblourens added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Dec 14, 2023
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone Dec 14, 2023
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@VSCodeTriageBot
Copy link
Collaborator

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@haydar-metin
Copy link

haydar-metin commented May 28, 2024

Hello!
We would also need to create data breakpoints through the extension API, and while searching for a solution, we've identified a gap in the VSCode implementation for data breakpoints. The method extHostDebugService.ts#addBreakpoints currently lacks the ability to forward data breakpoints (i.e., missing DTOs), while MainThreadDebugService.ts#$registerBreakpoints already supports it.
We propose updating extHostDebugService.ts#addBreakpoints to process data breakpoints similarly to other types of breakpoints. The solution would be, as already mentioned, introducing a new DataBreakpoint class and updating the respective API.

@KutluOzel-b did you have any progress so far to create data breakpoints? Thanks!

martin-fleck-at added a commit to eclipsesource/ms-vscode that referenced this issue Aug 27, 2024
- Allow the user to manage data breakpoints through vscode.debug API
- Add methods to gain information about a potential data breakpoint
- Allow data breakpoints to have different sources
-- Keep use case where data id is already known (current)
-- Add infrastructure for already existing address resolution
-- Extend for dynamic variables resolved for a session
--- Ensure dynamic variables are resolved in the debug model

Communication:
- Adapt DataBreakpoint with source between extension host and main
- Expose DataBreakpoint in VS Code API, previously not exposed

Minor:
- Make bytes optional in data bytes info, as it is the same in the DAP

Part of microsoft#195151
martin-fleck-at added a commit to eclipsesource/ms-vscode that referenced this issue Aug 27, 2024
- Allow the user to manage data breakpoints through vscode.debug API
- Add methods to gain information about a potential data breakpoint
- Allow data breakpoints to have different sources
-- Keep use case where data id is already known (current)
-- Add infrastructure for already existing address resolution
-- Extend for dynamic variables resolved for a session
--- Ensure dynamic variables are resolved in the debug model

Communication:
- Adapt DataBreakpoint with source between extension host and main
- Expose DataBreakpoint in VS Code API, previously not exposed

Minor:
- Make bytes optional in data bytes info, as it is the same in the DAP

Part of microsoft#195151
martin-fleck-at added a commit to eclipsesource/ms-vscode that referenced this issue Aug 27, 2024
- Allow the user to manage data breakpoints through vscode.debug API
- Add methods to gain information about a potential data breakpoint
- Allow data breakpoints to have different sources
-- Keep use case where data id is already known (current)
-- Add infrastructure for already existing address resolution
-- Extend for dynamic variables resolved for a session
--- Ensure dynamic variables are resolved in the debug model

Communication:
- Adapt DataBreakpoint with source between extension host and main
- Expose DataBreakpoint in VS Code API, previously not exposed

Minor:
- Make bytes optional in data bytes info, as it is the same in the DAP

Fixes microsoft#195151
martin-fleck-at added a commit to eclipsesource/ms-vscode that referenced this issue Aug 27, 2024
- Allow the user to manage data breakpoints through vscode.debug API
- Add methods to gain information about a potential data breakpoint
- Allow data breakpoints to have different sources
-- Keep use case where data id is already known (current)
-- Add infrastructure for already existing address resolution
-- Extend for dynamic variables resolved for a session
--- Ensure dynamic variables are resolved in the debug model

Communication:
- Adapt DataBreakpoint with source between extension host and main
- Expose DataBreakpoint in VS Code API, previously not exposed

Minor:
- Make bytes optional in data bytes info, as it is the same in the DAP

Fixes microsoft#195151
martin-fleck-at added a commit to eclipsesource/ms-vscode that referenced this issue Aug 27, 2024
- Allow the user to manage data breakpoints through vscode.debug API
- Add methods to gain information about a potential data breakpoint
- Allow data breakpoints to have different sources
-- Keep use case where data id is already known (current)
-- Add infrastructure for already existing address resolution
-- Extend for dynamic variables resolved for a session
--- Ensure dynamic variables are resolved in the debug model

Communication:
- Adapt DataBreakpoint with source between extension host and main
- Expose DataBreakpoint in VS Code API, previously not exposed

Minor:
- Make bytes optional in data bytes info, as it is the same in the DAP

Fixes microsoft#195151
martin-fleck-at added a commit to eclipsesource/ms-vscode that referenced this issue Aug 27, 2024
- Allow the user to manage data breakpoints through vscode.debug API
- Add methods to gain information about a potential data breakpoint
- Allow data breakpoints to have different sources
-- Keep use case where data id is already known (current)
-- Add infrastructure for already existing address resolution
-- Extend for dynamic variables resolved for a session
--- Ensure dynamic variables are resolved in the debug model

Communication:
- Adapt DataBreakpoint with source between extension host and main
- Expose DataBreakpoint in VS Code API, previously not exposed

Minor:
- Make bytes optional in data bytes info, as it is the same in the DAP

Fixes microsoft#195151
martin-fleck-at added a commit to eclipsesource/ms-vscode that referenced this issue Sep 4, 2024
- Allow the user to manage data breakpoints through vscode.debug API
- Add methods to gain information about a potential data breakpoint
- Allow data breakpoints to have different sources
-- Keep use case where data id is already known (current)
-- Add infrastructure for already existing address resolution
-- Extend for dynamic variables resolved for a session
--- Ensure dynamic variables are resolved in the debug model

Communication:
- Adapt DataBreakpoint with source between extension host and main
- Expose DataBreakpoint in VS Code API, previously not exposed

Minor:
- Make bytes optional in data bytes info, as it is the same in the DAP

Fixes microsoft#195151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-proposal debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants