Python has its default debugger called pdb, but there are a few alternatives created by the community. Two of them are ipdb and pdb++. They seem to cater to the same audience, they can both be run directly at the CLI and provide some niceties such as colored output and tab-completion.
Do they serve different purposes or are they simply competing debuggers with similar features? I'm having trouble understanding when one would wish to use one over the other. There seem to even be people using both at the same time
I'm not a
pdbpp
expert, but to meipdb
comes with more features (IPython has many "magic" functions such as %timeit, %debug, etc that are handy), whilepdbpp
has asticky
mode that displays the source in the terminal as you step through (like GDB's TUI mode) and is more capable than the defaultpdb
.So they are both good options to debug, but my personal preference goes to
ipdb
because I'm used to work interactively from IPython. I've found I could set my main debugger toipdb
like so:And put
breakpoint()
in the Python source to debug. Ifpdbpp
is also installed, I can invokesticky
from theipdb
session, which is neat.