Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333600

Summary: Cannot set breakpoint on local variable
Product: [Eclipse Project] JDT Reporter: Michael Rennie <Michael_Rennie>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Michael Rennie CLA 2011-01-05 15:00:07 EST
I20110104-0920

Working in the class org.eclipse.ant.internal.ui.editor.OccurencesFinder I could not set a breakpoint on line 73: 		

String identifier;

I would only get an error message displayed on the status bar "Selection does not contain a field".

I would expect to the be able to set a breakpoint on this line.

Steps:

1. create the following class

public class C {
	public void foo() {
		String name; //BP here
	}
}

2. try to set a breakpoint where indicated

If you change the above snippet to be String name = "me"; a breakpoint can be set on the line.
Comment 1 Remy Suen CLA 2011-01-05 15:07:45 EST
(In reply to comment #0)
> String identifier;

I didn't think this ever worked.

> If you change the above snippet to be String name = "me"; a breakpoint can be
> set on the line.

You can also set it there if you initialize it to 'null'.
Comment 2 Michael Rennie CLA 2012-06-07 14:57:54 EDT
This has been fixed with bug 376354

*** This bug has been marked as a duplicate of bug 376354 ***
Comment 3 Markus Keller CLA 2015-12-06 16:43:09 EST
(In reply to Michael Rennie from comment #2)
> This has been fixed with bug 376354

No, this is a dup of bug 385435.
Comment 4 Markus Keller CLA 2015-12-06 16:43:26 EST

*** This bug has been marked as a duplicate of bug 385435 ***