3 ms·
You can run Python with PYTHONBREAKPOINT=print python and all your breakpoint() calls will be prints. Which is not super useful, however you can use
by masklinn 6y ago
You can run Python with
PYTHONBREAKPOINT=print python
and all your breakpoint() calls will be prints.
Which is not super useful, however you can use
PYTHONBREAKPOINT=icecream.ic
and now you get the advantages of TFA without having to import anything anywhere.
The only annoyance is that the default hook takes no arguments, so you can't trivially switch between the default and custom implementations, you may need to modify the source depending on the breakpoint hook you're using.