JavaScript variable disappears from the 'Variables' window

Using Intellij IDEA v12.0.4.

When stepping through JavaScript code (usually F7), variables will often disappear after their values are set. Using the following as an example:

01 var funca = function() {

02    var farray = [];

03    var i;

04    for (i = 0; i <= 4; i++) {

05        farray[i] = i;

06    }

07    return farray;

08 }

09 var fay = funca();

10 var x = fay[2];

The variable 'fay' in line 09 is visible in the 'Variables' window until the assignment is complete. Then it disappears.

Hovering over 'fay' in line 09 causes a popup to appear, indicating that it still exists and suggesting that its value can be displayed. However, clicking the '+' only causes the popup to disappear. The array 'fay' is not displayed. Placing a comment after the assignment corrects this and allows the array to be displayed using the popup.

Q. Why does 'fay' disappear?

Q. If it is normal for 'fay' to disappear a) where does it go, and b) is there an Intellij IDEA configuration setting that controls the disappearance or allows them to appear in either the 'Variables' window or other window?

Q. Is the inability to display 'fay' by using the hover and click method a bug?

Q. Is Intellij IDEA the best JetBrains IDE for JavaScript development?

I am new both to Intellij IDEA and to JavaScript, so if there is documentation that covers questions like these, please just point me to it.

Thanks.

6 comments
Comment actions Permalink

Cannot reproduce in IDEA 13 EAP, Google Chrome. https://dl.dropboxusercontent.com/u/43511007/s/Screen%20Shot%202013-06-07%20at%2010.04.56%20AM.png

On line 9 — fay is undefined (assigment is not complete)
On line 10 — I can see array contents

>> Is Intellij IDEA the best JetBrains IDE for JavaScript development?
If you need only "JavaScript development" — http://www.jetbrains.com/webstorm/ (Please try WS 7 EAP — http://confluence.jetbrains.com/display/WI/WebStorm+7+EAP)

0
Comment actions Permalink

Vladimir,

I will try IDEA 13 EAP.

In your test with IDEA 13, did the variables disappear from the 'Variables' window after the assignments completed?

I see that you tested using Chrome. My tests were with FireFox 21.0.

Does Webstorm have features that IDEA does not? I realize that IDEA is more expensive, but it supports many other languages and platforms. As long as it has all of the features of WebStorm, I will continue to prefer it over WebStorm. Is there a feature comparison matrix for IDEA vs. WebStorm?

Thanks and Best Regards,

TGee

0
Comment actions Permalink

>> In your test with IDEA 13, did the variables disappear from the 'Variables' window after the assignments completed?
No. It disappears on debugger resume.

>> feature comparison matrix for IDEA vs. WebStorm?
WebStorm — only HTML/CSS/JS (TypeScript/Dart/etc) See http://www.jetbrains.com/webstorm/features/index.html

0
Comment actions Permalink

Please note: WebStorm has more short release cycle, so, you can get access to latest improvements early.

0
Comment actions Permalink

develar wrote:

>> In your test with IDEA 13, did the variables disappear from the 'Variables' window after the assignments completed?
No. It disappears on debugger resume.


Is the disappearance normal? Why does it disappear?

Best Regards,

TGee

0

Please sign in to leave a comment.