Add a dump subcommand to the sampling profiler that prints a single, immediate snapshot of a running Python process's stack similar to gdb's py-bt, but built on the existing _remote_debugging unwinder.
The output should be formatted like a traceback (most recent call last), with file paths, line numbers, source lines with caret-style highlights, optional bytecode opcode names, and per-thread status (main thread / has GIL / on CPU / waiting for GIL / has exception / idle).
It should support the same flags as run (as many as possible)
Linked PRs
Add a
dumpsubcommand to the sampling profiler that prints a single, immediate snapshot of a running Python process's stack similar togdb'spy-bt, but built on the existing_remote_debuggingunwinder.The output should be formatted like a traceback (most recent call last), with file paths, line numbers, source lines with caret-style highlights, optional bytecode opcode names, and per-thread status (main thread / has GIL / on CPU / waiting for GIL / has exception / idle).
It should support the same flags as run (as many as possible)
Linked PRs
dumpsubcommand to sampling profiler for one-shot stack snapshots #149297