pudb
pudb copied to clipboard
Feature request: threading support
Has support for multi-threaded processes been considered in the past? Any pointers on how one would go about adding that to pudb?
You mean support for multiple threads in the same terminal? I don't how easy that would be. Would it require some kind of messaging protocol, or is it simpler than that?
If you want to debug multiple threads in different terminals, you can try remote debugging.
I guess I should add more details: ideally I would like to be able to use pudb to:
- list the threads a process has spawned (incl. their stacks, global/local vars, etc)
- switch to a specific thread to debug it (break, step, inspect, ...)
I assume that the first part is rather easy to implement: inspecting the python process to obtain information about threads is straight forward, and I would be happy to help implementing that. I cannot judge the effort for the second part.
Pudb is built on the same infrastructure as pdb, and based on the existence of this it seems that pdb-with-threads is not an entirely solved affair. Winpdb2 uses a different (more capable, though heavier-weight) infrastructure. I've considered moving pudb over to that, but never had the momentum.
I'd also love it if pudb could support multiple threads somehow.
I may have to use PyCharm's debugger for now, but I'm reluctant.
As long as pdb
can't do it, it's unlikely that pudb will: https://github.com/python/cpython/issues/85743