Skip to content
Advertisement

How to attach debugger to a python subproccess?

I need to debug a child process spawned by multiprocessing.Process(). The pdb degugger seems to be unaware of forking and unable to attach to already running processes.

Are there any smarter python debuggers which can be attached to a subprocess?

Advertisement

Answer

Winpdb is pretty much the definition of a smarter Python debugger. It explicitly supports going down a fork, not sure it works nicely with multiprocessing.Process() but it’s worth a try.

For a list of candidates to check for support of your use case, see the list of Python Debuggers in the wiki.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement