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
pdbppexpert, but to meipdbcomes with more features (IPython has many "magic" functions such as %timeit, %debug, etc that are handy), whilepdbpphas astickymode 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
ipdbbecause I'm used to work interactively from IPython. I've found I could set my main debugger toipdblike so:And put
breakpoint()in the Python source to debug. Ifpdbppis also installed, I can invokestickyfrom theipdbsession, which is neat.