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 232346 - Debugger does not list functions variables in Variables window
Summary: Debugger does not list functions variables in Variables window
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-07 19:36 UTC by Vladimir Riha
Modified: 2013-07-19 14:44 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-07-07 19:36:05 UTC
Please try to run this in e.g. Chrome with NB integration:


function Test(){
    var func = function(){};
    var number = 1;
    window.console.log(typeof func); // line breakpoint here
}

new Test();


Once code execution stops at given breakpoint, if you open Variables window, then "funct" is not there. Also if you hover over "func" in editor, there is no tooltip with property value (at least type "Function" or entire body function would be helpful - but I noticed that only because Variables window didn't help me). Workaround is easy but a bit impractical: add watch for "func". 

I'm marking it is P2 as it could be confusing, especially if you are debugging complex code or learning new patterns. But if you disagree, I don't have a strong opinion about it so please feel free to lower it.



Product Version: NetBeans IDE Dev (Build web-main-10995-on-20130706)
Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2013-07-07 19:38:49 UTC
Similarly:

function Test(){
    this.number = 1;
    this.func = function(){}
}

(function(){
  var a = new Test();
    window.console.log(1); // line breakpoint here
})()


=> Variables window does not show "func" property of "a". I haven't found a way to workaround that.
Comment 2 Vladimir Riha 2013-07-07 19:42:39 UTC
(In reply to comment #0)
> I'm marking it is P2 as it could be confusing, especially if you are debugging
> complex code or learning new patterns. But if you disagree, I don't have a
> strong opinion about it so please feel free to lower it.
> 

Considering also comment #1, I think this deserves P2
Comment 3 Martin Entlicher 2013-07-17 13:27:27 UTC
Functions are intentionally filtered out in the code.
It's not clear to me why, since Chrome shows them. Therefore I'll remove the filtering.
Comment 4 Martin Entlicher 2013-07-18 09:13:53 UTC
Fixed by changeset:   258746:f41db3ba157b
http://hg.netbeans.org/web-main/rev/f41db3ba157b
Comment 5 Quality Engineering 2013-07-19 02:33:10 UTC
Integrated into 'main-silver', will be available in build *201307182300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f41db3ba157b
User: mentlicher@netbeans.org
Log: #232346: Show function variables.
Comment 6 Vladimir Riha 2013-07-19 14:44:11 UTC
Thanks a lot, verified

Product Version: NetBeans IDE Dev (Build 201307182300)
Updates: Updates available
Java: 1.7.0_40-ea; Java HotSpot(TM) Client VM 24.0-b52
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-ea-b33
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)