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.
[ JDK VERSION : 1.6.0_02 ] Debugger not works with public static varibals (Unknown type) Steps 1 : Open attached project 2 : add a brake point to line 19( String test = main.returnString(ENUMS.STRING);) 3 :debug project 4 :when debugger hit brake point move cursor to "ENUMS.STRING" it says "Unknown type" 5 :even add watch to main.returnString(ENUMS.STRING) sys "Unknown type" Only possible workaround is add watch as main.returnString("STRING") but it is really painful if you have lots of Static Enums(Not enum type)
Created attachment 50884 [details] Project
Reproduced, thanks for the test project. It's strange, that Integer.MAX_VALUE is evaluated without problems. This is not a regression, NetBeans 5.5.1 suffers from the same problem. This is just another problem in NetBeans evaluator. A complete rewrite is really necessary, see issue #108873. Unfortunately this is a complex task, which can not be done into NB 6.0.
Any possibility of workaround fix(Patch)?
Fixed in the new evaluator algorithm - see issue #108873.
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.
It looks like in NB 8.0.2 the bug is back. Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 1 Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb) User directory: C:\Users\user_hidden\AppData\Roaming\NetBeans\8.0.2 Cache directory: C:\Users\user_hidden\AppData\Local\NetBeans\Cache\8.0.2 public class TestClassTwo { public static final int VARIABLE = 1; } public class TestClassOne { public static void main(String[] args) { System.out.println("value is: " + TestClassTwo.VARIABLE); } } When breakpoint is set in TestClassOne on line with println(String), debugger shows 'Unknown type "TestClassTwo"'.
Reproduced. The problem is, that TestClassTwo class was not loaded into the VM. The compiled code has hard-coded the final static value. I do not think debugger is able to show the value without loading the TestClassTwo class. Issue #168949 is preventing us from loading the class.