Remote debugger

suggest change

Sometimes you need to debug Python code which is executed by another process. In this case 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

Usage:

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

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

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

And you will get a pdb prompt

> /home/usr/ook.py(3)<module>()
-> print("Hello world!")
(Pdb)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents