windows.onload=function(){
...somecode...
var scene = new THREE.Scene();
...somecode...
var i;
var j;
for (i=......){...}
func2();
function func2(){
...somecode...
BREAK AT THIS LINE;
}
}
when I break at that line,
firebug says, “i” and “j” is undefined,but an inner function obviously can get the value of “i” right?
but weirdly, “scene” is showed correctly.
the Ctrl+Shift+I of chrome shows the same thing.
but the thing more weird is,
when I add
alert(i);
to the beginning of func2,
this time,
the msgBox tells the value of i correctly,
firebug shows the value of i correctly,
but j is still showed undefined.
I’m wondering why,
Both Firebug and chrome shows the same thing so it seems not a bug of Firebug,
so is there any hints for this?
thanks a lot.
The value of i should be available in the inner function. This prints “2” in Firebug and node.js as expected:
So is it just a matter of the debugger showing incorrect values?