[BLUEJ-465] Debugger highlights line that is not executed
Stepping through code (a switch inside a while loop) the debugger highlights a line that should (and is not) executed. (This is confusing for beginners.)
How to reproduce:
- Create class Test using the code below.
- Create a new instance this class.
- Add a breakpoint to line System.out.println("1");
- Run method test. The debugger opens.
- Click on "Step" in the debugger two times. Now the line System.out.println("2"); is highlighted. This is wrong.
{noformat} public class Test { public void test() { while (true) { switch (1) { case 1: { System.out.println("1"); // breakpoint here break; } case 2: { System.out.println("2"); // line that gets highlighted } } } } } {noformat}
Issue metadata
- Issue type: Bug
- Priority: Low