microsoft / microsoft/debug-adapter-protocol

Support nesting of threads

Open
#339 1 comment 9 reactions 2 assignees View on GitHub

@connor4312 is already working on this.

Since Oct 10, 2022.

feature-request
Dominant language
HTML
Stars
1.8k
Forks
173
Avg merge
7d 7h
Merged PRs (30d)
2

Description

I propose adding a property to Thread that a debug adapter can use to specify a parent-child relationship between threads. If thread 1 is the parent of thread 2, the development environment may choose to display thread 2 as a child of thread 1.

interface Thread {
  /**
   * Identifier of the thread's parent thread.
   */
  parentId?: number;
}
Motivation

Go uses green threads, called goroutines. A Go release in the near future will provide information from the debugger than can be used to determine a parent-child relationship between goroutines. Complex servers may have hundreds or thousands of goroutines. Debugging such a server can be challenging, especially when attempting to hunt down what caused a goroutine to be launched. I want Go's debug adapter, DAP, and VSCode to be updated to provide me the option of nesting goroutines to both make the call stack panel more manageable and make it easier to track down the ultimate cause of an event.

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.