Check what a running process is doing: print stack trace of an uninstrumented Python program Check what a running process is doing: print stack trace of an uninstrumented Python program python python

Check what a running process is doing: print stack trace of an uninstrumented Python program


Some of the answers in Showing the stack trace from a running Python application are applicable in this situation:


winpdb allows you to attach to a running python process, but to do this, you must start the python process this way:

 rpdb2 -d -r script.py

Then, after setting a password:

A password should be set to secure debugger client-server communication.Please type a password:mypassword

you could launch winpdb to File>Attach to (or File>Detach from) the process.


on POSIX systems like Linux, you can use good old GDB, see

There's also the excellent PyCharm IDE (free community version available) that can attach to a running Python process right from within the IDE, using Pdb 4 under the hood, see this blog entry: