ID EN
Debugger (pdb)

set_trace

Python 3.11

Enter the debugger at the calling stack frame. This is useful to hard-code a breakpoint at a given point in a program, even if the code is not otherwise being debugged (e.g. when an assertion fails). If given, header is printed to the console just before debugging begins.

Syntax

PYTHON
pdb.set_trace(*, header=None)