pdb is Python's interactive source debugger, and breakpoint() is the usual way to enter it
Answer: The pdb module is an interactive source code debugger for Python. It supports conditional breakpoints, single stepping, stack inspection, source listing, and evaluating code in a stack frame. It also supports post-mortem debugging. The typical way to break into it is to insert breakpoint().
Claims
- id: C1 claim: pdb is an interactive source code debugger for Python. source: S1 evidence: "defines an interactive source code debugger for Python"
- id: C2 claim: The typical way to enter the debugger is to insert breakpoint(). source: S1 evidence: "The typical usage to break into the debugger is to insert"
- id: C3 claim: The published docs describe pdb the same way. source: S2 evidence: "interactive source code debugger for Python"
- id: C4 claim: The published docs also document breakpoint() as the entry point. source: S2 evidence: "breakpoint()"
Sources
- [S1] pdb — The Python Debugger (CPython docs source). python/cpython (GitHub). https://github.com/python/cpython/blob/main/Doc/library/pdb.rst . License: PSF-2.0. Accessed 2026-11-18.
- [S2] pdb — The Python Debugger. Python Software Foundation. https://docs.python.org/3/library/pdb.html . License: PSF-2.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: python/cpython (GitHub), pdb — The Python Debugger (CPython docs source), PSF-2.0 (https://raw.githubusercontent.com/python/cpython/main/LICENSE); Python Software Foundation (docs.python.org), pdb — The Python Debugger, PSF-2.0 (https://docs.python.org/3/license.html). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: python/cpython (GitHub), pdb — The Python Debugger (CPython docs source), PSF-2.0 (https://raw.githubusercontent.com/python/cpython/main/LICENSE); Python Software Foundation (docs.python.org), pdb — The Python Debugger, PSF-2.0 (https://docs.python.org/3/license.html).
Cite this
iinventedlight. 2026. "pdb is Python's interactive source debugger, and breakpoint() is the usual way to enter it." iinventedlight Library, iil:note:mejce2d4, version of 2026-11-18. https://iinventedlight.com/library/notes/python-pdb/. License: CC-BY-4.0.
@misc{iil_note_mejce2d4,
author = {{iinventedlight}},
title = {{pdb is Python's interactive source debugger, and breakpoint() is the usual way to enter it}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/python-pdb/},
note = {Permanent ID iil:note:mejce2d4. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/python-pdb.md.