[New-bugs-announce] [issue14105] Breakpoints in debug lost if line is inserted; IDLE

Larry A. Taylor report at bugs.python.org
Fri Feb 24 02:35:27 CET 2012

New submission from Larry A. Taylor <larry.taylor at bankofamerica.com>:

My environment is Windows XP, using IDLE and Python 2.7 distribution.

Open an IDLE Python shell. Open the file with three lines in it, 1,2 and 3.

In IDLE, Set Breakpoint on Line 2.

In Shell, set Debug.

In IDLE, select run. 

In the Debug window, click Go.

Run stops at line 2, displayed in Debug. Click Quit.

Edit the file, inserting a line 0, like: print "this is line 0". Save the file

Run again, Go in Debug. 

The breakpoint has disappeared and the debugger does not stop on line 2 (now the third line). It doesn't stop anywhere.

Delete line 0, and set breakpoint on line 2 again. At the end of the file, insert a line 4, such as: print "this is line 4".

Run again, Go in Debug.

The breakpoint is preserved, and the debugger stops at line 2.

This is inconsistent behavior. I expect that a breakpoint will not disappear, and that it will always point to the same line, moving down when the line moves down. The breakpoint should move up if the line it refers to moves up.

components: IDLE, Windows
files: debug-line-numbers.py
messages: 154104
nosy: ltaylor934
priority: normal
severity: normal
status: open
title: Breakpoints in debug lost if line is inserted; IDLE
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file24621/debug-line-numbers.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list