Re: JSD_EvaluateScriptInStackFrame and "var" variables

James Ross <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
Dassburger wrote:
> Here is the example script:
> 
>  1:  function a()
>  2:  {
>  3:    var x = 5;
>  4:    y = 6;
>  5:    edt1.Text = x+y;
>  6:  }
>  7:
>  8:  var z = 1;
>  9:
> 10:  a();
> 
> Suppose we have an execution hook at line 5. If I try to evaluate
> scripts "x", "y", "z" in the hook handler with
> JSD_EvaluateScriptInStackFrame(), I get following results "undefined",
> "6", "1".

That sounds very much like you're evaluating in the wrong end of the 
stack frame - y and z are globals in that script, so it would make sense 
of the results.

What's the frame you're using? The one passed to the execution hook 
should be the right one.

-- 
James Ross <[email protected]>
ChatZilla Developer
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.