[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

Roger Serwy report at bugs.python.org
Tue Oct 9 05:21:28 CEST 2012


Roger Serwy added the comment:

While trying to address #15347, I discovered one too many corner cases where the debugger breaks IDLE. The stable_idle_debugger.diff against 3.4 contains necessary changes to make IDLE more reliable while debugging. Since the IDLE debugger is not documented these changes should not be controversial.

Here are all the cases the patch fixes:
1) Closing the debugger while debugging causes the shell to not respond to new commands when using a subprocess.
2) Pressing F5 in an editor several times with an active debugger causes IDLE to become unresponsive. 
2.1) When not using the subprocess, the patch fixes an AttributeError in runcode in PyShell.py, since .interp is not an attribute of the interpreter.
3) Closing the shell window while the debugger is debugging prevents IDLE from terminating if no editors are open. #15347
4) Closing the shell with an idle debugger causes a traceback in the shell (with no subprocess).

The patch creates the following behavior:

1) The debugger cannot be closed by clicking "X" while it is debugging. Instead, the "Quit" button gets flashed as a reminder to stop the debugger before closing.
2) Pressing F5 in the editor window while the debugger is debugging brings focus to the debugger window.
3) Closing the shell will close the debugger properly. The .close() method of Debugger.py quits the nested eventloop in .interaction() if needed.

I tested these issues and solutions on Linux. Can someone review the patch for Windows and Mac?

----------
stage:  -> patch review
Added file: http://bugs.python.org/file27502/stable_idle_debugger.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15348>
_______________________________________


More information about the Python-bugs-list mailing list