Re: Strange behaviour on stepping.
James Ross <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.jsdebugger |
|---|---|
| Message-ID | <[email protected]> |
Dassburger wrote:
> Hello!
>
> One more question from me. Suppose we have the following script:
>
> ===================================================
> 1: var x = 5;
> 2:
> 3: Log.WriteLine('1');
> 4:
> 5: x = x + 2;
> 6:
> 7: var y = x + 3;
> 8: Log.WriteLine('2');
> ===================================================
>
> First, I set an execution hook at line 1, start the script. Then I add
> an interrupt hook and return from execution hook handler. I see a
> strange behaviour. SpiderMonkey seems to pass the script twice, first,
> it only stops at lines 1 and 7. Then it starts to execute the script as
> usual, line by line: 3, 5, 7, 8.
Is that the exact script used? I ask because if you have functions, you
will get an execution hook for each function declaration in the
top-level script as that is run (even if there's no code outside functions).
If it is the exact script used, can you try dumping all the PC values
through a single run? I'm interested in whether the places it stops on
line 1 and 7 are PC values that it hits again during the 'real' run.
--
James Ross <[email protected]>
ChatZilla Developer