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

2021-06-14 Thread Irit Katriel


Irit Katriel  added the comment:

I recently fixed a bug where breakpoints were not saved properly between reruns 
of the program - the assumption there was that if you set a breakpoint you 
don't want to have to set it again and again. 

Similarly, how do you know that the change to sys.path was made by the program 
rather than by a user from the debugger prompt?

It is easy enough to reset the state (just start a new debugger session) but if 
you want to restart the program with the env as it currently is, and you can't, 
it can be very annoying to have to re-apply all your settings again.

--
nosy: +iritkatriel
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-11-17 Thread Andrey Bienkowski


New submission from Andrey Bienkowski :

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com