mdmintz / pdbp

pdbp (Pdb+): A drop-in replacement for pdb and pdbpp. To replace "pdb", add "import pdbp" to an "__init__.py" file.
Other
75 stars 2 forks source link

Documenting using PYTHONBREAKPOINT #40

Closed DavideCanton closed 1 year ago

DavideCanton commented 1 year ago

Maybe it may make sense to add something in the README regarding the possiblity of registering pdbp using PYTHONBREAKPOINT="pdbp.set_trace" as an alternative to importing pdbp in the source code?

mdmintz commented 1 year ago

Good idea. I can add that to the ReadMe. Something with:

PYTHONBREAKPOINT If this is set, it names a callable using dotted-path notation. The module containing the callable will be imported and then the callable will be run by the default implementation of sys.breakpointhook() which itself is called by built-in breakpoint(). If not set, or set to the empty string, it is equivalent to the value “pdb.set_trace”. Setting this to the string “0” causes the default implementation of sys.breakpointhook() to do nothing but return immediately. New in version 3.7.

Probably by tomorrow or very soon.

DavideCanton commented 1 year ago

Hi, thanks for your response!

I think that an example (like the one I provided) could help people like me that didn't know PYTHONBREAKPOINT :)

mdmintz commented 1 year ago

@DavideCanton I made a few updates to the ReadMe to include this! https://github.com/mdmintz/pdbp/blob/master/README.md

DavideCanton commented 1 year ago

Looks nice!

Thank you for the update!