[issue35679] pdb restart hooks

Hernot report at bugs.python.org
Mon Jan 7 08:55:53 EST 2019


New submission from Hernot <christoph at out-world.com>:

I like the PDB debugger it is a quite powerfull tool, despite a few donws. One is that cleanup code eg registered by debugged script, module is not executed on restart. a crude hack is to check whether pdb is invoked via python -mpdb using inspect and decorate pdb._runscript and psb._runmodule methods with own versions calling registered cleanup methods before returning to main.

A cleaner approach would be if either pdb intercepts atexit calls recording any method which is registered by a call to atexit.register or provide it's own atexit method to register methods which pdb should call to revert to a clean enviroment expected by the script or module at startup.

open to any discussion, examples will follow as necessary.

----------
components: Demos and Tools, Library (Lib)
messages: 333150
nosy: Hernot
priority: normal
severity: normal
status: open
title: pdb restart hooks
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35679>
_______________________________________


More information about the Python-bugs-list mailing list