-
Notifications
You must be signed in to change notification settings - Fork 59
Description
For the following example:
import junit.framework.TestCase;
public class BreakpointBug extends TestCase
{
public void test() {
int length = 0; // Breakpoint line
if (getName() != null) {
length = getName().length();
}
else {
length = 0;
}
System.out.println(length);
}
}
A breakpoint may be set on the ``int length = 0;``` line and a blue filled circle is shown in the left hand ruler. Good.
Debug execution stops at the breakpoint showing a ticked blue filled circle in the left ruler. Good.
If the line is edited to int length; no warning is issued and the circle is still shown in the left hand ruler. Confusing.
Toggling the break point fails almost silently; there is a message on the status bar that I had never noticed till I prepared this repro. It needs to be much more evident. A popup would be too irritating. So I suggest an in-place decoration, Perhaps a cross on top of the blue filled circle, or perhaps a red filled circle. The hovertext should show the status message.
When lines are removed, the 'editor' seems to make an attempt to migrate the breakpoint to the equivalent line. (Sometimes it seems good other times pretty crazy.)
Whatever, this bug: a broken breakpoint should not remain without warning on a not-breakpointable line; it should be moved to the nearest 'equivalent' line to maximize utility. It is very confusing to the user when breakpoints are shown in the editor and the breakpoints view but do not break. A crossed or red filled circle would at least clearly indicate the broken breakpoint.