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 151446 - Watches window does not show local variables
Summary: Watches window does not show local variables
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Strupl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-27 11:15 UTC by Alexandr Scherbatiy
Modified: 2008-11-06 12:14 UTC (History)
1 user (show)

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 Alexandr Scherbatiy 2008-10-27 11:15:45 UTC
JavaFX_NB_Plugin_NB65_promoted: #54  2008-10-27_03-01-09.zip

  Product Version         = NetBeans IDE 6.5 RC1 (Build 200810171318)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.5.0_09; Java HotSpot(TM) Client VM 1.5.0_09-b03; Sun Microsystems Inc.


Steps to reproduce:

- Copy the code to the editor:
-------------------------------------------------
var a = 10;
var b = 20;
-------------------------------------------------
- Set a breakpoint to the 'b' variable
- Debug the file
- Open Watches window 
- Add new watch expression: a

The 'a' value is not shown:

>Unsupported, not an expression: "package javafxapplication5;
 
 class Main {
     
     /*synthetic*/ public static synthetic function javafx$run$(parameter script only (default)<ARGS>:
String[];)java.lang.Object private protected static final synchronized {
         variable initialization for static script only (default) var a = 10;
 
         variable initialization for static script only (default) var b = 20;
 
     }
     static script only (default) var a = 10;
     static script only (default) var b = 20;
 
 }
 "<
Comment 1 Alexey Butenko 2008-10-28 10:48:48 UTC
I always get null tree from TreeUtilities.parseExpression method, but 
it was work recently.
David could you take a look into it?
Comment 2 David Strupl 2008-10-28 14:16:31 UTC
Hello,

did you try almost the same but inside a function like

function foo() {
var a = 10;
var b = 20;
}

I think it should work there? The problem with the declaration is that you cannot type an expression around the declared
variables. At least I think. It will need a bit more investigation.

Maybe we could add a function called blablablablabla() around the expression in such cases so the expression can be parsed?
Comment 3 Alexandr Scherbatiy 2008-10-28 14:30:54 UTC
> did you try almost the same but inside a function like
It does not work too:

- Copy the code to the editor:
-------------------------------------------------
function foo() {
    var a = 10;
    var b = 20;
}

foo();
-------------------------------------------------
- Set a breakpoint to the 'a'  variable
- Debug the file
- Open Watches window 
- Add new watch expression: a

>Unsupported, not an expression: "{
     a
     script only (default)var a = 10;
 
     script only (default)var b = 20;
 
 }"<
Comment 4 David Strupl 2008-10-28 21:18:14 UTC
I think this should be fixed on our side now (before release).
Comment 5 David Strupl 2008-11-03 10:36:57 UTC
Fixed in TreeUtilities.parseExpression after changeset
1709:43a5c01dcd44
Comment 6 Alexandr Scherbatiy 2008-11-06 12:14:28 UTC
verified in 2008-11-06_03-01-09.zip