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!!")
Edit this page on GitHub

Contributors

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

Learn Python on Codecademy

Edit this page on GitHub

Contributors