You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDLE closes with save while breakpoint open #54012
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/asvetlov'closed_at=<Date2012-07-31.16:54:06.140>created_at=<Date2010-09-08.19:42:27.532>labels= ['expert-IDLE', 'type-bug']
title='IDLE closes with save while breakpoint open'updated_at=<Date2012-07-31.16:54:06.139>user='https://bugs.python.org/Jimbofbx'
I have multiple versions of python - 2.6.1 and 3.1.2. 2.6.1 is the primary install (i.e., right click on a file and "edit with IDLE" brings up 2.6), and was installed first. This issue occurs on 3.1.2, Windows XP 32-bit
If I highlight a breakpoint, run with the debugger, make a change, then save, IDLE will close all windows after saving without an error message. If I clear the breakpoint and then save, IDLE will not close. Reopening the file reveals that the save was successful. I do not need to actually be stopped at a highlighted breakpoint for this to occur (i.e. this will occur if I save at the beginning before the script has ran). If I run with 2.6.1 I do not see this issue. The save difference could be something simple, such as adding a space somewhere random.
Attached is a patch to fix the issue. The ranges_to_linenumbers function relies on the results of text.tag_ranges. The returned tuple contains Tk textindex objects. While these objects contain a string, they are not string objects. Its .string value must be used instead.
Activity
Jimbofbx commentedon Sep 8, 2010
I have multiple versions of python - 2.6.1 and 3.1.2. 2.6.1 is the primary install (i.e., right click on a file and "edit with IDLE" brings up 2.6), and was installed first. This issue occurs on 3.1.2, Windows XP 32-bit
If I highlight a breakpoint, run with the debugger, make a change, then save, IDLE will close all windows after saving without an error message. If I clear the breakpoint and then save, IDLE will not close. Reopening the file reveals that the save was successful. I do not need to actually be stopped at a highlighted breakpoint for this to occur (i.e. this will occur if I save at the beginning before the script has ran). If I run with 2.6.1 I do not see this issue. The save difference could be something simple, such as adding a space somewhere random.
serwy commentedon Apr 14, 2012
This is a duplicate of bpo-6257.
serwy commentedon Jul 18, 2012
Reopening. I mistakenly closed this issue as a duplicate, but this issue involves breakpoints, unlike 6257.
serwy commentedon Jul 18, 2012
Attached is a patch to fix the issue. The ranges_to_linenumbers function relies on the results of text.tag_ranges. The returned tuple contains Tk textindex objects. While these objects contain a string, they are not string objects. Its .string value must be used instead.
python-dev commentedon Jul 31, 2012
New changeset 47536beb7453 by Andrew Svetlov in branch '3.2':
Issue bpo-9803: Don't close IDLE on saving if breakpoint is open.
http://hg.python.org/cpython/rev/47536beb7453
New changeset 28c935ded243 by Andrew Svetlov in branch 'default':
Issue bpo-9803: Don't close IDLE on saving if breakpoint is open.
http://hg.python.org/cpython/rev/28c935ded243
New changeset 8f1a8e80f330 by Andrew Svetlov in branch '2.7':
Issue bpo-9803: Don't close IDLE on saving if breakpoint is open.
http://hg.python.org/cpython/rev/8f1a8e80f330
asvetlov commentedon Jul 31, 2012
Thanks, Roger!