breakpoint
Prev: bool | Up: __builtins__ | Next: bytearray
Rel: compile, eval, exec, globals, input
Ref: docs.python.org — breakpoint
Tags: #public #python3 #builtins
Import & Availability
# Built-in (available globally without import)
from builtins import breakpoint
Overview & Signature
breakpoint(*args, **kws)
Call sys.breakpointhook(*args, **kws). sys.breakpointhook() must accept whatever arguments are passed.
Usage
import sys
# Calls sys.breakpointhook() -> drops into pdb unless PYTHONBREAKPOINT=0
assert callable(breakpoint) and callable(sys.breakpointhook)
Gotchas
- Set
PYTHONBREAKPOINT=0in CI to disable all breakpoints globally, or set it toipdb.set_traceto swap debuggers without editing code.
REPL Inspect
help(breakpoint)
Linked from
- tuts/python3/__builtins__
- tuts/python3/__builtins__/__builtins__
- tuts/python3/__builtins__/bool
- tuts/python3/__builtins__/bytearray
- tuts/python3/__builtins__/compile
- tuts/python3/__builtins__/eval
- tuts/python3/__builtins__/exec
- tuts/python3/__builtins__/globals
- tuts/python3/__builtins__/input
- tuts/python3/__builtins__/locals
- tuts/python3/__builtins__/open
- tuts/python3/__builtins__/print
Related notes
- tuts/python3/__builtins__/__builtins__ Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/bool Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/bytearray Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/compile Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/eval Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/exec Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/globals Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/input Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__ links to this page; shared tags: #builtins
- tuts/python3/__builtins__/locals links to this page; shared tags: #builtins