Bug 5437

Summary: Variable not showing in Variables view even when assigned a value
Product: [Eclipse Project] JDT Reporter: Veronika Irvine <veronika_irvine>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P1    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Veronika Irvine CLA 2001-11-01 17:18:41 EST
Eclipse 20011025
Windows 2000

1) Create the class included below.
2) Place a breakpoint as described in the comments of the code.
3) Run in the debugger.

public class _Scrapbook {

public static void main(String[] args) {
	_Scrapbook app = new _Scrapbook();
	app.doit();
}
void doit() {
	Object object = this; // put breakpoint here !!!
	do {
		System.out.println("asdads"+object);
		object.toString();
	} while (false);
}
}

The line "Object object = this;" assigns to the variable 'object' but then when 
you step into the do loop, the variable does not appear in the Variables view.  
When you step over the println statement, then 'object' appears in the 
Variables view.

I asked Olivier to investigate and he said the ranges returned are valid.
Comment 1 Darin Wright CLA 2001-11-01 18:21:29 EST
I tried this on JDK1.2, JDK1.3, the standard JRE, and J9 using the latest code 
base. In all cases, this worked for me - the variable appears after I step over 
the declaration, and remains until the method is exited.

I did verifty that when using build 20011025, I get the described problem.

Please re-try in build 20011101 when available.
Comment 2 Darin Wright CLA 2001-11-02 16:25:27 EST
Still a problem in 20011101.
Comment 3 Darin Wright CLA 2001-11-02 16:27:11 EST
Woops - I was fooled by having the wrong view in the foreground (breakpoints 
view instead of variables view). This does work for me in 20011101.