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

Better support for large number of green-thread like things #169

Open
weinand opened this issue Jan 4, 2021 · 3 comments
Open

Better support for large number of green-thread like things #169

weinand opened this issue Jan 4, 2021 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@weinand
Copy link
Contributor

weinand commented Jan 4, 2021

TBD

(for now see discussion #159)

@weinand weinand added the feature-request Request for new features or functionality label Jan 4, 2021
@connor4312
Copy link
Member

connor4312 commented Jan 4, 2021

cc @polinasok / @gregg-miskelly / @hyangah from the original issue

My experience with green threads come from Go. Thinking about the user experience, when debugging a Go program I would like to:

  1. See how many threads are currently executing each line of code, like what pprof in Go gives.
  2. Have ability to step into or introspect thread(s) on each line of code, i.e. issue a "pause" for a thread when it resumes.
  3. 'Track' or 'isolate' a thread so I can easily step back into it. For example, if I have a websocket server I usually have at least one goroutine per connection, but might be interested in only debugging one of them. If the debugger supports it, being able to set a breakpoint so that it only hit by 'tracked' threads would be phenomenal.

The main protocol change is that threads would not be updated ambiently in an individually addressable way in the threads event. I think this is something we want to avoid since dealing with events for millions of threads could become problematic from a performance standpoint.

Perhaps instead the debug adapter could provide location metadata as in (1), and a mechanism to "realize" threads. Realization would happen when:

  • a breakpoint is hit by a thread
  • the ui requests an (arbitrary?) thread at a location to be realized

A thread would get a DAP threadId and should get threads events only after it's realized. This would allow (2) and (3). The UI could also request to "unrealize" a thread.

Something this doesn't cover is cases where additional metadata for threads, outside of location, is available. For example in Elixir/Erlang users might be want to explore the supervisor tree -- though I don't think this structure is relevant to m/any other languages.

@polinasok
Copy link
Contributor

@aarzilli

@weinand
Copy link
Contributor Author

weinand commented Jun 21, 2021

@connor4312 since we already have an UI related issue for the "many threads debugging UI" in the VS Code repo, may I suggest that you copy your comment from above to #116109. Thanks!

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