Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

A backport of `breakpoint` to python<3.7

Project description

Build Status Azure DevOps coverage

future-breakpoint

A backport of breakpoint to python<3.7.

install

pip install future-breakpoint

supported versions

python2.7+, python3+, (noop on python3.7+)

usage

Once installed, you should be able to use breakpoint() in the same way as in python3.7+.

def rand():
    breakpoint()  # no need for `import pdb; pdb.set_trace()`
    return 4

See PEP 553 for full usage!

how though?

  • a C extension which implements the PEP
  • a .pth file executed on startup (see setup.py) patches sys / builtins

you may also like

Project details


Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page