Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348374 - Debug breakpoints get stale on editing code
Summary: Debug breakpoints get stale on editing code
Status: CLOSED DUPLICATE of bug 330878
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-06 05:51 EDT by Ayushman Jain CLA
Modified: 2014-06-30 02:37 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ayushman Jain CLA 2011-06-06 05:51:38 EDT
Build id:3.7RC4

package p;
public class Bug {
    void foo(String name) {
        try { 
        }
        
        if (true) {
        	System.out.println();     // Put breakpoint here
        } else {
        	System.out.println();
        }
       
    }
}

Put the breakpoint at line 7. Now edit the try block so that the code looks like this
public class Bug {
    void foo(String name) {
        try { 
	        System.out.println();
        	int abc = 1;
        }
        
        if (true) {
        	System.out.println();     // Breakpoint stays on this line
        } else {
        	System.out.println();
        }
       
    }
}

Note that the breakpoint moves down 2 lines i.e. at line 9 and stays along with the System.out.println();, but its just a stale marker. Looking at the breakpoints view, you see that a breakpoint on line 7. Trying to remove the stale breakpoint at line 9 by double clicking the blue dot fails, but adds a fresh breakpoint instead (see breakpoints view). 

Such a scenario can also occur when i delete some code and the breakpoint moves a few lines up/down. I always have to manually delete the stale breakpoint in the breakpoints view.
Comment 1 Michael Rennie CLA 2011-06-06 10:02:34 EDT
This problem is caused by our marker updater not working as expected (bug 330878).

*** This bug has been marked as a duplicate of bug 330878 ***
Comment 2 Sarika Sinha CLA 2014-06-23 01:44:58 EDT
Works fine with Luna RC4 build.
Comment 3 Sarika Sinha CLA 2014-06-30 02:37:02 EDT
(In reply to Sarika Sinha from comment #2)
> Works fine with Luna RC4 build.

My mistake in understanding the problem. It works fine only after the save. It should refresh the Breakpoint view without save as well.