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
Written by Caio Ariede
Related protips
3 Responses
You could also use rpudb (https://github.com/msbrogli/rpudb).
over 1 year ago
·
Please, see command below.
ubuntu@ip-10-0-0-312:~$ telnet 127.0.0.1 5555
Trying 127.0.0.1...
Connected to 127.0.0.1.
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
·
I have a question on stackoverflow about it
https://stackoverflow.com/questions/51249904/remote-debugging-of-python-server-with-rpdb
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#