Skip to content

Updating breakpoint from debug adapter does not work if another session is focused #80014

@dgozman

Description

@dgozman

When implementing Debug Adapter Protocol, I sometimes issue breakpoints event where breakpoints change the verified status from false to true. If that happens while another debugging session is current (focused), the update is ignored.

I think the problem is in this line. Here idFromAdapter depends on currently focused debugging session, which may or may not be the one receiving the event.

Steps to reproduce:

  • Use this modified version of vscode-mock-debug.
  • Run the mock debug extension on testWorkspace folder included in the branch above.
  • Set breakpoint in the session2.md file on the line with "lazy".
  • Launch "Bug" configuration.
  • Two scenarios
    • If you select "Session2" during first 5 seconds, breakpoint on the "lazy" line will be verified after 5 seconds (Session2 will emit "breakpoint changed" DAP event).
    • If you don't select "Session2" during first 5 seconds (e.g. do nothing, Session1 will be focused by default), the breakpoint will not be verified, and switching between sessions afterwards does not help.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issueshelp wantedIssues identified as good community contribution opportunitiesverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions