The lack of discussion about pdb on the internet speaks to Python's simplicity and transparency. There just aren't many subtle traps to fall into from which you need a debugger to free yourself.
At my current job I write C++ and I use a debugger practically every day. My previous job was all Python and I reached for pdb maybe 3 times in 4 years.
I do find I use it reasonably often but have never reached for the documentation once. Which speaks to the intuitiveness of pdb as much as my experience with living in gdb when coding in C++.
I love using pdb when debugging django test cases find it faster than using prints all over the place.
The debugger runs as a full screen GUI app, which you attach via sockets to a running process, so you can easily debug stuff like FCGIs on other machines, etc.
There is also a fairly useful debug module named epdb from the guys at rpath. It opens up a port and lets you netcat to it and debug remotely. This is great for running things in a virt and being able to actually cut and paste to the debug session.
12 comments
[ 2.8 ms ] story [ 37.6 ms ] threadAt my current job I write C++ and I use a debugger practically every day. My previous job was all Python and I reached for pdb maybe 3 times in 4 years.
I love using pdb when debugging django test cases find it faster than using prints all over the place.
import pydevd; pydevd.settrace('192.168.xxx.xxx')
Same kind of thing, but with full debug UI, and you can debug remote processes, eg behind apache!
The debugger runs as a full screen GUI app, which you attach via sockets to a running process, so you can easily debug stuff like FCGIs on other machines, etc.
http://bitbucket.org/rpathsync/epdb
* Wonder how you ever did without it
* Wonder why on earth it's not a standard part of Python
* Free your code of crappy conditional debug prints forever
* Take ipdb to bed and cuddle it at night
Just:
Then where you'd like to start debugging: Type 'help' for help.