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.
Created attachment 105710 [details] Debug menu with Evaluate Expression item disabled. Product Version: NetBeans IDE 7.0 Beta 2 (Build 201102052128) Java: 1.6.0_23; Java HotSpot(TM) 64-Bit Server VM 19.0-b09 System: Linux version 2.6.35-22-generic running on amd64; UTF-8; cs_CZ (nb) Userdir: /home/cesilko/.netbeans/7.0beta2 Description: ============ "Evaluate Expression" action is greyed out when debugging session is started. This is regression against NetBeans IDE 6.9.1 behavior. See attached screenshot. Steps to reproduce: =================== 1. Launch NetBeans IDE 7.0 Beta 2 candidate build #201102052128 with clean userdir. 2. Generate Anagram Game sample project and invoke "Debug > Debug Main Project" from main menu. 3. Once the debugger and application is started invoke "Debug" menu to see that "Evaluate Expression" action is disabled.
And does it enable when debugger hits a breakpoint? We can not evaluate anything when all threads are running. There needs to be some context - suspended thread - in which the evaluation takes place. It works fine for me when a breakpoint is hit.
Yes, I understand that Martine. Evaluation of expressions does not make sense if the program execution is not stopped. But it's a regression so I reported it. So, in other words this (disabled action) is intentional change against NetBeans IDE 6.9.1? Thanks for your clarification.
Aha, so I've checked the history... Originally, the Evaluate Expression action was enabled only when there was some current thread. But then the action was made always enabled by Dan in changeset http://hg.netbeans.org/releases/rev/e6ce26f3cb14. After I was moving the action into debugger core UI - http://hg.netbeans.org/main/rev/8fc152089118, I've reused the old behavior. Unfortunately, there's no reference to some UI proposal or spec. when the action was made always enabled. I'll try to find some... The Evaluate Expression window is not usable till debugger is stopped on some breakpoint anyway.
According to the NetBeans IDE 6.8 test specification [1] the action should be enabled. Probably just to have a chance to open the evaluator window. [1] http://wiki.netbeans.org/TS_68_Debugger_Sanity#Test_suite:_Evaluate_Expression_View
O.K. I'm reopening this to reevaluate...
I'm sorry, but this is now impossible to implement. After changes in issue #191394 the "Evaluate Expression" action looks for a currently active debugger-specific provider and run it. Java debugger opens a different evaluator window than gdb debugger (which is under Window -> Debugging -> Expression Evaluation, also disabled when C/C++ session is not running). Therefore, if no debugger session is active, there's no universal evaluator window to open. IMHO this is no problem for NetBeans users. When there's no debugging session, there's no way to evaluate anything. This should not be a regression from usability point of view.
OK, I understand. Then I only updated the test specification accordingly. Thanks for the investigation Martine.