Goodbye Print, Hello Debugger!
PyCon US 2020 · Virtual · 2020
Debugging Python Developer Tools
If you’re still debugging Python code with print() statements, you’re working too hard. A proper debugger lets you pause execution, inspect any variable, step through code line by line, and even modify values at runtime — all without changing your source code.
This talk walks through the full spectrum of Python debugger tooling, from pdb (the standard library’s built-in command-line debugger) to the rich graphical debuggers available in modern Python IDEs. We’ll work through hands-on walkthroughs using real buggy code, diagnosing problems the way experienced developers actually do.
You’ll leave knowing how to:
- Set breakpoints and step through code with
pdb - Use
ipdbfor an improved interactive experience - Navigate the call stack and inspect frames
- Watch variables and set conditional breakpoints
- Use the debugger built into VS Code and other IDEs
Additional resources: Python Debugging Cheat Sheet
Also Presented At
- DjangoCon US 2019 — Watch on YouTube
- PyCon Australia 2019 — Watch on YouTube