Closed bbelderbos closed 11 months ago
I couldn't agree more @bbelderbos. I write code in pdb as well then copy whats working into my python file.
I do prefer ipdb because it fits my style with tab completion which allows me to discover the API on the fly or just in time plus some nice rich colors :).
Nice, and the commands you'll use can be counted on one hand, it's more getting into the habit of putting breakpoint() and writing code in the debugger, no magic there, just habit forming. I need to check ipdb again Ryan, tab completion seems useful! Thanks.
Ryan it looks like my pytest is using vanilla pdb for now because I don't have tab completion and man am I missing it! Just trying to figure out the various 'paths' through the objects. I think I'll look into upgrading...
And I saw @ryaustin already "sneaked" it into manage.py the other day ;)
$ git blame manage.py
...
7f1a3e4a (ry_austin 2023-11-30 12:31:09 -0500 9) os.environ.setdefault("PYTHONBREAKPOINT", "ipdb.set_trace")
So Jeff only has to pip install ipdb
now and good to go right?
Yup!
Here is a quick video: https://youtube.com/watch?v=OWGyfBBwpSM
I use it for way more than just fixing bugs:
pdb is like the Swiss Army knife of programming tools for me. 🔥