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.
Test case 1: public class OuterClass { int field; public static void main(String[] args) { new OuterClass().new InnerClass().method(); } class InnerClass { void method() { System.out.println(field); } } } Test case 2: public class OuterClass { static int field; public static void main(String[] args) { new StaticInnerClass().method(); } static class StaticInnerClass { void method() { System.out.println(field); } } } Steps to reproduce: 1. Put a breakpoint on the System.out.println() statement in one of the test-cases above. 2. Debug the file and wait till it hits the breakpoint. 3. Add "field" watch. 4. Attempt to change the value of the "field" watch. => The value is not changed and a warning dialog is shown. The dialog says "Cannot set value to 'field', unknown variable.".
Reproduced.
Fixed by changeset: 290253:b16159558cd6 http://hg.netbeans.org/core-main/rev/b16159558cd6
Integrated into 'main-silver', will be available in build *201507300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b16159558cd6 User: mentlicher@netbeans.org Log: #253649: Remember the container of the evaluated value, if there is one, and use it to set watch values.