Author roger.serwy
Recipients asvetlov, jimbo1qaz, roger.serwy, terry.reedy
Date 2012-10-09.03:21:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349752888.14.0.439375487223.issue15348@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2012-10-09 03:21:28roger.serwysetrecipients: + roger.serwy, terry.reedy, asvetlov, jimbo1qaz
2012-10-09 03:21:28roger.serwysetmessageid: <1349752888.14.0.439375487223.issue15348@psf.upfronthosting.co.za>
2012-10-09 03:21:28roger.serwylinkissue15348 messages
2012-10-09 03:21:27roger.serwycreate