Re: Current version of Venkman?

Robert North <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Organization Zen Internet
Message-ID <[email protected]>
7stud wrote:
> Sheesh! Finally, it works.  I read this newsgroup with IE6, and when I
> clicked on your link it launched an IE window, so that is why it wouldn't
> download.  When I switched to FF1.0, it downloaded fine.

Hmm.
They should really give users a better error.
Use it as advertising.... tell them they need to download and run 
Firefox ;-)

> 
> However, this whole quest was to see if a newer version of Venkman would
> work for me, but I am still having trouble understanding the logic of how
> Venkman steps through a simple script.  Here is the idiotically simplistic
> script I am trying to step through:
> 
> 
>>3) <script>
>>4) var a = 1;
>>5) function test(a) {
>>6)    var t = "passed : ";
>>7)    return t + a;
>>8) }
>>9) var b = test(a);
>>10) document.write("<p>" + b + "</p>");
>>11) </script
> 
> 
> Here are my steps:
> 
> 1)Open page with that javascript on it in FF.
> 
> 2)Set the script as the Evaluation object:
> Open Windows tab>right click mouse on the file name> Set as Evaluation
> Object
> 
> 3) Click Venkman's Stop button.
> 
> 4)Reload the page with the script, and line 4 is highlighted in yellow
> 
> 5)Click on Step Into to advance to line 5.
>  In the local variables list 'a' is void, and if I type 'a' into the
> Interactive Session window, 'a' is void.
> 
> How in the heck is that possible???!!
> 

Could it be a locals vs. globals issue.
I don't know how JS does it's variable scoping, but
may be something to look up.

Also, at line 5 you're not running the function, you're stepping through
it's definition.
Maybe globals (or any vars for that matter) don't make sense in
reading in the definition.

What happens at line 9?

What's on the stack?

What happens if you insert the line:
	var b = 7;
between line 4 & 5.

Will have to muck around with your script when I have time.

Bye
	-Rob.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.