[issue42387] Pdb should restore the execution environment before reexecuting the target

Andrey Bienkowski report at bugs.python.org
Tue Nov 17 06:54:28 EST 2020


New submission from Andrey Bienkowski <hexagonrecursion at gmail.com>:

When the target exits, pdb automatically restarts it. If the target changed something before exiting the changes will remain unless pdb explicitly undoes them. While working on #42383 I had an idea: it would be useful if pdb reverted the changes the target makes to the execution environment (to a reasonable extent) before restarting it. This includes:

1. os.getcwd() - currently not reverted
2. os.environ - I did not check if this is currently restored or not
3. sys.argv - --/--
4. sys.path - --/--

----------
components: Library (Lib)
messages: 381225
nosy: hexagonrecursion
priority: normal
severity: normal
status: open
title: Pdb should restore the execution environment before reexecuting the target

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


More information about the Python-bugs-list mailing list