breakpoint()

The breakpoint() function engages, configures, and changes the debugger program used in a script.

Syntax

breakpoint()

By default, the breakpoint() function imports the pdb debugger module.

Example

Use breakpoint() to open the pdb debugger console:

print("Welcome to Codecademy!")
breakpoint()
print("Welcome back to Codecademy!!")

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn Python on Codecademy

Contributors