Python Debugging Cheat Sheet/Pretty-print in pdb

Print structured data in a readable format.

Section: Breakpoints and pdb

Pretty-print in pdb

text
text
pp complex_object

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Breakpoints and pdb
Insert a built-in breakpoint
Pause execution and enter the configured debugger.
OpenIn sheetpythonsame section
Drop into pdb at a specific line
Classic explicit breakpoint using pdb.
OpenIn sheetpythonsame section
Run a script under pdb
Start Python's debugger from the command line.
OpenIn sheetbashsame section
Run a script with pdb and arguments
Pass normal program arguments when starting under pdb.
OpenIn sheetbashsame section
pdb next
Step over the current line without entering function calls.
OpenIn sheettextsame section
pdb step
Step into a called function.
OpenIn sheettextsame section