Saturday 3:15 p.m.–4 p.m.
In Depth PDB
Nathan Yergler
- Audience level:
- Intermediate
- Category:
- Python Core (language, stdlib, etc.)
Description
Abstract
Python's debugger, PDB, is a powerful built-in tool, but its interface is less than inviting. Many programmers I've worked with use it simply, if at all: setting a break point, and then inspecting the local state, occassionally stepping a few lines in, before continuing or killing the program.
PDB can do so much more.
PDB allows programmers to set breakpoints on the fly, re-run programs on exit to continue debugging, and inspect and modify execution flow. And that's just for starters.
By leveraging PDB's features you can fire breakpoints conditionally, display useful information when they fire, even construct simple "watches" on variables.
PDB is included in the standard library, which means that there are additional tools that extend if further, providing ways to debug web applications and debug over a network connection.
This talk will provide novice Python programmers with a basic understanding of the Python debugger. Intermediate programmers who know about PDB will come away with knowledge of how they can better leverage it when working with their programs.