microsoft / microsoft/debug-adapter-protocol
Support stop reasons for multiple threads (with one flagged as current) in a single stopped event
Open
Nobody has claimed this yet.
feature-request
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 173
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 2
Description
In highly concurrent languages it is possible to hit multiple breakpoints at the same time (or hit a breakpoint while responding to a user halt request). For example, see dlv documentation and related https://github.com/golang/vscode-go/issues/130.
Currently the only way to support reporting of multiple breakpoints is to send multiple stopped events. There are a couple of issues with this (besides the obvious extra redundant traffic from multiple stopped events):
- At least in vscode, the events must be issued in a specific order to achieve the desired UI effect. The ordering interactions are not obvious from the protocol. For example, the current thread must be the one with the stopped event sent last, so that's the thread that gets its variables reflected in the UI. And
AllThreadsStoppedfield must be set only in the first stopped event we send, or it will overwrite the specific reasons from the additional stopped events with the default "paused". - Each stopped event triggers a
threadsrequest. And while the subsequentstackTracerequests are thread-specific, thethreadsrequests are the same every time and can be quite expensive. See related issues: https://github.com/microsoft/vscode/issues/110927, https://github.com/microsoft/debug-adapter-protocol/issues/159).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.