[Python-Dev] PEP 553 V2 - builtin breakpoint() (was Re: PEP 553: Built-in debug())

Nick Coghlan ncoghlan at gmail.com
Thu Sep 7 21:12:20 EDT 2017


On 7 September 2017 at 11:43, Barry Warsaw <barry at python.org> wrote:
> Environment variable
> --------------------
>
> Should we add an environment variable so that ``sys.breakpointhook()``
> can be
> set outside of the Python invocation?  E.g.::
>
>     $ export PYTHONBREAKPOINTHOOK=my.debugger:Debugger
>
> This would provide execution environments such as IDEs which run Python code
> inside them, to set an internal breakpoint hook before any Python code
> executes.

Related to this is the suggestion that we make the default
sys.breakpointhook() a no-op, so that accidentally checking in calls
to breakpoint() won' t hang CI systems.

Then folks that wanted to use the functionality would set
"PYTHONBREAKPOINTHOOK=pdb:set_trace"

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list