microsoft / microsoft/debug-adapter-protocol

Support stop reasons for multiple threads (with one flagged as current) in a single stopped event

Open
#161 1 comment 2 reactions 1 assignee View on GitHub

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):

  1. 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 AllThreadsStopped field 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".
  2. Each stopped event triggers a threads request. And while the subsequent stackTrace requests are thread-specific, the threads requests 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.