I have a python script that I suspect that there is a deadlock. I was trying to debug with pdb but if I go step by step it doesn\'t get the deadlock, and by the
There is a clone of pdb, imaginatively called pdb-clone, which can attach to a running process.
You simply add from pdb_clone import pdbhandler; pdbhandler.register() to the code for the main process, and then you can start pdb with pdb-attach --kill --pid PID.