This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 149528 - Watches and local variables window does not work
Summary: Watches and local variables window does not work
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords: USABILITY
Depends on:
Blocks:
 
Reported: 2008-10-08 15:25 UTC by Jiri Prox
Modified: 2010-04-29 09:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2008-10-08 15:25:46 UTC
Product Version: NetBeans IDE Dev (Build 20081007032925)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)

The watches are always evaluated to 'unknown type' and local variables are not shown in local variables window when
debugging String.indexOf(char[] source, int sourceOffset, int sourceCount,char[] target, int targetOffset, int
targetCount, int fromIndex) method

Steps to reproduce:
1) debug code:
        String a = "abcdefghijklmnop";
        String b = "defa";       
        boolean c = a.contains(b);

2) use step into to get to mentioned method
Comment 1 Petr Cyhelsky 2008-10-08 16:43:48 UTC
reproduced on:

Product Version: NetBeans IDE Dev (Build 200810080201)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b14
System: Windows Vista version 6.0 running on x86; Cp1250; cs_CZ (nb)

In my case all variables newly declared in jdk classes are affected.
Comment 2 Martin Entlicher 2008-10-08 18:32:31 UTC
I understand that this is very confusing. But it's NOT a functional bug.
Local variables can not be seen, because JDK sources are not compiled with local variable information ("-g:vars" or "-g"
switch to javac is necessary to have variable information). Therefore debugger has no way to find their values.

But the confusion is made by showing the parameters to methods. Since JDK 1.6 we can use StackFrame.getArgumentValues()
call, which returns the arguments regardless of the compiler information.

Therefore we present parameters, but can not present local variables defined in the body of the method. We should
indicate this somehow.

Therefore decreasing the priority to P3 and leaving this as a usability defect.
Comment 3 Daniel Prusa 2009-03-27 10:03:23 UTC
Fixed, "Variable info not available" warning will be displayed in Variables view now.

http://hg.netbeans.org/main/rev/501aa94984c7
Comment 4 Quality Engineering 2010-04-29 09:44:32 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.