ID EN
Built-in Functions

breakpoint

Python 3.11

This function drops you into the debugger at the call site. Specifically, it calls sys.breakpointhook(), passing args and kws straight through. By default, sys.breakpointhook() calls pdb.set_trace() expecting no arguments. In this case, it is purely a convenience function so you don’t have to explicitly import pdb or type as much code to enter the debugger. However, sys.breakpointhook() can be set to some other function and breakpoint() will automatically call that, allowing you to drop into the debugger of choice. If sys.breakpointhook() is not accessible, this function will raise RuntimeErro

Syntax

PYTHON
breakpoint(*args, **kws)

See Also

sys.breakpointhook() pdb.set_trace() pdb sys.breakpointhook() breakpoint() sys.breakpointhook() RuntimeError breakpoint()