Classic explicit breakpoint using pdb.
Section: Breakpoints and pdb
Drop into pdb at a specific line
python
python
import pdb; pdb.set_trace()Explanation
Useful when you want an explicit dependency-free breakpoint in scripts and older codebases.
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.
Run a script with pdb and arguments
Pass normal program arguments when starting under pdb.