Closed mlubimow closed 3 years ago
LGTM! Thanks for your contribution.
@inducer Actually I realised recently that it's current behaviour also is not fully correct. I was focused on fixing the existing code more than the logic itself, and later I had second thoughts that on continue we probably don't want to close the session, because when in normal remote mode (reverse=False) it might be inconvenient to be required to telnet again if there is another breakpoint. Do you know if there is any hook that would allow us to run some code once the debugged process ends?
On the good side, with reverse=True its easy as its enough to add -k flag to nc (stty -echo -icanon && nc -l -p 6899 -k) to make continue to work as expected.
Do you know if there is any hook that would allow us to run some code once the debugged process ends?
Possibly atexit
?
Actually I realised recently that it's current behaviour also is not fully correct.
Should we revert this in the meantime?
@inducer Yeah atexit seems to be a way better idea, I will create another PR fixing this.
Fix for https://github.com/inducer/pudb/issues/289.