Last Updated: July 09, 2018
· caioariede

Python: Remote debugging with pdb

Sometimes you need to debug a code inside a thread or running in background.

rpdb is a wrapper around pdb using a tcp socket to communicate with the outside world.

pip install rpdb

In your code:

import rpdb; rpdb.Rpdb().set_trace()

Then connect through telnet to debug your code!

telnet localhost 4444

3 Responses
Add your response

You could also use rpudb (

over 1 year ago ·

Please, see command below.

ubuntu@ip-10-0-0-312:~$ telnet 5555
Connected to
Escape character is '^]'.

After that I open url which is supposed to call rpdb and I get nothing. So, how I can reach rpdb from command line then?

over 1 year ago ·