Commit 3041032
committed
Enhance remote debugging module with structured data and coroutine stacks
This commit refactors the C module to provide richer debugging information
by introducing structured data types and exposing internal coroutine call
stacks. The improvement transforms the debugging output from showing only
external task dependencies to revealing the complete execution context.
The key enhancement is the ability to display both the internal coroutine
call stack (what the task is doing internally) and the external awaiter
chain (what the task is waiting for). This dual perspective makes it much
easier to understand complex async execution patterns.
Before this change, the debugging output only showed file paths without
function names or internal call stacks. With this improvement, developers
can now see the complete picture: "foo2 -> sleep" shows the task is in
a sleep call within the foo2 function, while the awaiter chain shows the
external dependency structure.
The implementation replaces raw tuples with structured sequences:
- FrameInfo: Function name, filename, and line number
- CoroInfo: Call stack and associated task name
- TaskInfo: Task ID, name, coroutine stack, and awaiter relationships
- ThreadInfo: Thread ID and frame information
- AwaitedInfo: Thread ID and list of awaited tasks
This structured approach eliminates magic indices and provides better
type safety and introspection capabilities.1 parent e7a3c20 commit 3041032
1 file changed
+243
-97
lines changed
0 commit comments