Python Language Debugging Remote debugger


Some times you need to debug python code which is executed by another process and and in this cases rpdb comes in handy.

rpdb is a wrapper around pdb that re-routes stdin and stdout to a socket handler. By default it opens the debugger on port 4444


# In the Python file you want to debug.
import rpdb

And then you need run this in terminal to connect to this process.

# Call in a terminal to see the output
$ nc 4444

And you will get pdb promt

> /home/usr/<module>()
-> print("Hello world!")