Skip to content

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

License

Notifications You must be signed in to change notification settings

duane9/printbreakpoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrintBreakpoint

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

Install printbreakpoint with pip.

pip install printbreakpoint

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

export PYTHONBREAKPOINT=printbreakpoint.pb

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

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=

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages