Open mschurr opened 1 year ago
Do you expect them to show up as logical threads directly under process nodes?
I think it's more valuable that they show up at all than where specifically they show up.
That said, it probably makes the most sense to nest them under the OS thread running the event loop if possible?
Having them show up as children under the event loop thread (or threads, since there can be multiple - I totally forgot about that!) makes a lot of sense.
Problem is, on the debugpy end of things, we can only do as much as DAP permits - and it doesn't have the notion of async threads as something distinct, nor does it allow to nest threads. So, we need to update the DAP protocol to have some way to represent all this in a language-agnostic way, and then VSCode needs to support those additions.
Something to take into account as well is structured concurrency, where tasks are nested in a tree. This is the case for trio as well as the new TaskGroup api. It would be nice if future changes to the DAP spec would include support for these kind of relations between async tasks, so that the client can visualize them as a tree.
Please feel free to redirect this feature request to the appropriate spot, as I had difficulty determining where that is.
I would like to have better support for debugging asyncio event loops. Specifically, I would like
asyncio.Task
s to appear in the CALL STACK section of the Python debugger, alongside the existing support for processes and threads.Here's an example that shows how it's possible to retrieve information about running tasks from an asyncio EventLoop that would be fantastic to display in the debugger:
This outputs: