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 174737 - No values for variables in "Variables" first time
Summary: No values for variables in "Variables" first time
Status: VERIFIED WONTFIX
Alias: None
Product: javafx
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-16 12:11 UTC by Lukas Hasik
Modified: 2010-02-02 03:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (61.81 KB, image/jpeg)
2009-10-16 12:15 UTC, Lukas Hasik
Details
IDE screenshot (87.61 KB, image/png)
2009-11-02 10:19 UTC, Alexandr Scherbatiy
Details
Screenshot (variables after being evaluated) (10.05 KB, image/jpeg)
2009-11-02 10:51 UTC, Petr Suchomel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2009-10-16 12:11:45 UTC
Product Version: NetBeans IDE Dev (Build 200910160201)
Java: 1.6.0_15; Java HotSpot(TM) 64-Bit Server VM 14.1-b02-92
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)
Userdir: /Users/lukas/netbeans/userdirs/nb1016-fxful-inst

-debug simple code
-there are no values shown in the Variables window of debugger
-see screenshot
Comment 1 Lukas Hasik 2009-10-16 12:15:03 UTC
Created attachment 89612 [details]
screenshot
Comment 2 Michal Skvor 2009-10-19 10:52:06 UTC
What number of pass is it? First or second?
Comment 3 Lukas Hasik 2009-10-19 11:10:59 UTC
first pass, I never expected more passes. 

code:
var a = 1;
var b = 2;
var c = a + b;

I step through the lines a, b. Stopped at c and expected results of a, b to be shown in Variables window. But they shows
after evaluation of the expression c. It behaves in different way then Java debugger
Comment 4 Michal Skvor 2009-10-27 12:32:47 UTC
Fixed.

2792:3af259814088
Comment 5 Alexandr Scherbatiy 2009-11-02 10:16:49 UTC
I do not see the variable values in the Variables window at the first pass in the build 200910310201

Comment 6 Alexandr Scherbatiy 2009-11-02 10:19:21 UTC
Created attachment 90410 [details]
IDE screenshot
Comment 7 Petr Suchomel 2009-11-02 10:48:56 UTC
I suspect, this is basically problem of JavaFX bytecode. Try to step over several times, the are line number generated
for these lines which are not related to these expressions, later on this gets evaluated. IMHO, the debugger shows
correct values for incorrect bytecode.
Comment 8 Petr Suchomel 2009-11-02 10:51:38 UTC
Created attachment 90411 [details]
Screenshot (variables after being evaluated)
Comment 9 Michal Skvor 2009-11-09 03:54:47 UTC
This seems to be Java Debugger issue.
Comment 10 Martin Entlicher 2009-11-09 09:13:42 UTC
With JavaFX debugger you must be patient. It does not work like Java debugger!

Consider following program:

18: var a = 10;
19: var b = 20;
20: var c = a + b;

1) put breakpoint to line 18 and start debugger
2) Program stops on line 18, Variables show a = 0, b = 0, c = 0
   Do not ask me why.
   These variables are simply already defined with initial values.
3) Step Over goes to line 19, but does not change variable values.
4) Step Over goes to line 20, but does not change variable values.
5) Step Over goes to package declaration (hmmmm)
6) Step Over goes to line 18 again!
7) Step Over stays on line 18, but something is already going to happen...
   Variables show "varNewValue$" as 10.
8) Step Over stays on line 18, but "a" is 10! Wow.
9) Step Over goes to line 19
10) Step Over goes to line 20 and "b" changes to 20!
11) Step Over goes to line 18 again! (hmmmm)
12) Step Over goes to line 20
13) Step Over and finally "c" changes to 30!

So the conclusion is: debugger works! :-)
Comment 11 Alexandr Scherbatiy 2009-11-19 05:05:58 UTC
First time the debugger shows zero values for the variables.
Comment 12 Martin Entlicher 2009-11-19 05:26:25 UTC
This is true, but this can not be fixed.
Sorry, it's how JavaFX works.
Please complain to JavaFX compiler, not debugger. And JavaFX compiler is out of control of NetBeans.
Comment 13 Petr Suchomel 2009-11-19 05:29:00 UTC
Yes, Alexander, look what is in classfiles - the behavior does exactly what classfile contain and we can not do anything for it. There is first pass when 0 values are assigned and this code has correct line numbers. During second pass correct values are updated. This is purely SDK/compiler issue.
Comment 14 Alexandr Scherbatiy 2010-02-02 03:09:28 UTC
verified as will not fix