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

[Debug Adapter Protocol] - Sending BreakpointEvent for new breakpoints do not work for data breakpoints #406

Open
theIDinside opened this issue Jun 14, 2023 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality under-discussion Issue is under discussion for relevance, priority, approach

Comments

@theIDinside
Copy link

theIDinside commented Jun 14, 2023

When attempting to inform VSCode that a new data breakpoint has been created, for instance by using the debug console (so it doesn't go through the normal route of clicking on the watch variables etc), VSCode never registers it in the "Breakpoints" list - it only seems to be able to register them if they are normal breakpoints (and as such contains the source information).

So for instance, if I set a breakpoint using the debug console;

{
  type: "event",
  event: "breakpoint",
  body: {
    reason: "new",
    breakpoint: {
      id: 6,
      verified: true,
      source: { name: "foo.cpp",  sourceReference: 0,  path: "/foo.cpp"  },
      line: 168,
      instructionReference: "0x402f2d",
    },
  },
}

Vscode will register it. However, the same can not be said for data breakpoints, which only contain an id and the verified field.

Can VSCode only show watchpoints if they have gone through the dataBreakpointInfo request - and if so, why?

@roblourens roblourens transferred this issue from microsoft/vscode Jun 17, 2023
@roblourens
Copy link
Member

roblourens commented Jun 17, 2023

My interpretation is that the existing breakpoint event in DAP can't do this, it would have to be extended to let you send along the info from dataBreakpointInfo as well. Does that sound right?

@roblourens roblourens added the info-needed Issue requires more information from poster label Jun 17, 2023
@connor4312
Copy link
Member

it would have to be extended

I concur

@roblourens roblourens added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Jun 18, 2023
@theIDinside
Copy link
Author

My interpretation is that the existing breakpoint event in DAP can't do this, it would have to be extended to let you send along the info from dataBreakpointInfo as well. Does that sound right?

Probably true. So a better place to request this feature would be in the DAP-github?

@connor4312
Copy link
Member

Rob already moved this issue to the DAP repo 🙂

@theIDinside
Copy link
Author

Rob already moved this issue to the DAP repo slightly_smiling_face

Thanks a bunch! I'm going to close this issue then.

@connor4312
Copy link
Member

This issue is now on the DAP repo, so we should keep it open to track

@connor4312
Copy link
Member

Supporting this is a bit ugly because we have no way to go backwards from a dataId to the relevant info that editors might need, such as a description or alternative accessTypes. So there are two options:

  1. Also require properties DataBreakpointInfoResponse & DataBreakpoint from the DA
  2. Add an additional method to look up information from a data ID

Neither are very nice. The latter is probably nicer, but I hesitate to add a whole other request for a very niche flow (we've had no other requests for this.)

Since this issue was written there have been additional capabilities added, under supportsDataBreakpointBytes, which might solve the use case to allow clients to implement the desired flows without additional protocol changes.

@connor4312 connor4312 added the under-discussion Issue is under discussion for relevance, priority, approach label Aug 7, 2024
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 under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

3 participants