Last active
November 4, 2022 08:09
-
-
Save gh640/5d266954e691fe5eee7fb857b65a9eee to your computer and use it in GitHub Desktop.
Running IPython or bpython with `breakpoint()` on Python 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/bash | |
| # Use IPython. | |
| PYTHONBREAKPOINT=IPython.terminal.debugger.set_trace python myscript.py | |
| # Use bpython. | |
| PYTHONBREAKPOINT=bpdb.set_trace python myscrippt.py |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The related PEP is PEP 533.
https://www.python.org/dev/peps/pep-0553/#id11