Python Debugging Cheat Sheet
Core Python debugging commands, traceback inspection, runtime introspection, and practical troubleshooting workflows.
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Breakpoints and pdb
## Tracebacks and Exceptions
## Runtime Inspection
## Logging and Diagnostics
## pytest and unittest Debugging
## Profiling and Memory
## Async, Web, and Production Troubleshooting
More in Python Debugging
Python Profiling and Troubleshooting Cheat Sheet
Profile Python programs, inspect memory and imports, and diagnose slow or stuck processes.
Python Test Debugging Cheat Sheet
pytest and unittest debugging patterns for isolating failures, flaky tests, fixtures, and CI-only issues.
Python Logging and Tracing Cheat Sheet
Reference for Python logging, stack traces, warning visibility, trace hooks, and instrumentation patterns.
Python pdb and Breakpoint Cheat Sheet
Focused reference for pdb commands, breakpoints, stepping, stack frames, and conditional debugging.