Skip to main content

Use breakpoint() to print out filename, line number, and module

Project description

Install with pip:

pip install printbreakpoint

Update the PYTHONBREAKPOINT environment variable (available starting in Python 3.7):

export PYTHONBREAKPOINT=printbreakpoint.pb

Now when you add a breakpoint() to your code, it will show the output from pb.

def some_function(a):
    breakpoint()
    return a

Prints

pb | some_file.py:3 in some_function

Any data you pass to the breakpoint() will be added to the output.

Change the environment variable back to the default when you’re ready to continue using pdb.

export PYTHONBREAKPOINT=

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for printbreakpoint, version 0.9.2
Filename, size File type Python version Upload date Hashes
Filename, size printbreakpoint-0.9.2.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page