3 ms·
Since python3.8 you can just call `breakpoint()` and it does the same as `import pdb; pdb.set_trace()` Also since were on the topic I started using pdb++ and m
by animal_spirits 4y ago
Since python3.8 you can just call `breakpoint()` and it does the same as `import pdb; pdb.set_trace()`
Also since were on the topic I started using pdb++ and my debugging got incredibly more efficient.
https://github.com/pdbpp/pdbpp https://github.com/pdbpp/pdbpp
- dc-programmer 4y agoNice recs, I’ll have to check pdb++ out. Another tip is to add —-pdb to pytest so that it starts the debugger on each test failure.
- solarmist 4y agoYou should check out ipdb too. That’s my recommendation.
- solarmist 4y agoI like ipdb over pdb. All of the niceties of ipython when debugging. If you export `PYTHONBREAKPOINT=ipdb.set_trace` you can use this ipdb too.
- toomanydoubts 4y agoI also wanna give a shout out to pudb, for those who want a more visual experience. It uses curses to offer a GUI-like debugging experience while on the terminal. Real nice piece of software.