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 234037 - No expression to evaluate
Summary: No expression to evaluate
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on: 234645
Blocks:
  Show dependency tree
 
Reported: 2013-08-06 17:33 UTC by Tomas Pavek
Modified: 2013-08-30 15:57 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 Tomas Pavek 2013-08-06 17:33:45 UTC
Steps to reproduce:
1) Open 'form' project from NetBeans sources.
2) Place breakpoint on first line of FormEditorModule.restore method, i.e. on:
   Beans.setDesignTime(true);
3) Start NetBeans, attach debugger...
4) When debugger stops, step into the Beans.setDesignTime method. Step over everything in this method - so 'Current Program Counter' is show at the closing }.
5) Now evaluate the following expression:
   java.beans.ThreadGroupContext.getContext()
It works well.
6) Now step out from the method (back to FormEditorModule class) and evaluate the expression again.
You get "No Expression to evaluate" window, the evaluation does not work. And it does not work on other places either. Seems like the debugger must be stopped in the same package to evaluate a static method call?

I'm seeing this consistently in Dev Build 201307282300 on Windows 7 JDK u25.
Comment 1 Tomas Pavek 2013-08-06 17:41:22 UTC
Strange it's actually always possible to evaluate 'java.beans.Beans.isDesignTime()', which is quite similar...
Comment 2 Martin Entlicher 2013-08-08 12:10:58 UTC
I have reproduced the problem.
ThreadGroupContext is package private class, this can cause the trouble in evaluator based on javac.
Comment 3 Martin Entlicher 2013-08-08 12:47:03 UTC
The problem is, that the appropriate type element is marked as an error element, since it's not accessible from a different package.
We'd need some mechanism how to disable the access checks in the javac parser.
Comment 4 Quality Engineering 2013-08-12 02:14:51 UTC
Integrated into 'main-silver', will be available in build *201308112300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/49907dd44877
User: mentlicher@netbeans.org
Log: #234037: Preparing tests for evaluation of expressions that access private elements.
Comment 5 Martin Entlicher 2013-08-30 15:57:53 UTC
Fixed by changeset:   263200:2df6cf07b590
http://hg.netbeans.org/core-main/rev/2df6cf07b590