Title: Pdb should restore the execution environment before reexecuting the target
Type: Stage:
Components: Library (Lib) Versions:
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: hexagonrecursion
Priority: normal Keywords:

Created on 2020-11-17 11:54 by hexagonrecursion, last changed 2020-11-17 11:54 by hexagonrecursion.

Messages (1)
msg381225 - (view) Author: Andrey Bienkowski (hexagonrecursion) * Date: 2020-11-17 11:54
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 - --/--
Date User Action Args
2020-11-17 11:54:28hexagonrecursioncreate