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 238940 - [nashorn] Variables shows wrong values for core JavaScript objects
Summary: [nashorn] Variables shows wrong values for core JavaScript objects
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-28 16:10 UTC by Vladimir Riha
Modified: 2014-02-09 13:10 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 Vladimir Riha 2013-11-28 16:10:13 UTC
Please try to debug this file:


var d = new Date();
var x = 1;
var y = {a: 1, b: new Date()};
var f = function() { // line breakpoint here
};


and open Variables window

=> value of "d" is undefined, but it should be expandable object (Date), tooltip shows string value of Date, but in HTML5 project, it is again expandable object



Product Version: NetBeans IDE Dev (Build 201311280002)
Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b59
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b117
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2013-12-12 15:32:09 UTC
Please notice that also "b" on line 3 has wrong (but different) value in Variables and tooltip:
 - value in Variables is {}
 - tooltip over b shows null


Product Version: NetBeans IDE Dev (Build 201312120002)
Comment 2 Martin Entlicher 2014-02-09 13:10:51 UTC
The value of "d" is fixed by http://hg.netbeans.org/core-main/rev/e3c406e084af
But I do not think we can easily fix the "tooltip over b" problem.
The tooltip would have to detect somehow, that "b" is actually under "y" and evaluate it as "y.b", not "b" only.