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

Support nesting of threads #339

Open
firelizzard18 opened this issue Oct 8, 2022 · 1 comment
Open

Support nesting of threads #339

firelizzard18 opened this issue Oct 8, 2022 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality

Comments

@firelizzard18
Copy link
Contributor

firelizzard18 commented Oct 8, 2022

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.

@connor4312
Copy link
Member

I think this makes sense as proposed.

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
Projects
None yet
Development

No branches or pull requests

3 participants