Subj : Step-by-step execution... To : netscape.public.mozilla.jseng From : Corey Murtagh Date : Fri May 23 2003 07:26 pm For a very large project I worked on a few years ago we needed a scripting environment that would break at the end of each statement, effectively single-stepping through the script. I won't go into the reasons why this was necessary, but it was. We created our own scripting language, based loosely on Basic, with compiler and virtual machine. Now we would like to update this system, preferrably using JavaScript as the scripting language since it is so much more versatile than the language we created. To clarify: we need to have the script pause at the end of ANY statement, so this code: var sum = 0; var count = 0; for (var i = 0; i < 10; i++) { sum += i; count++; } ....would break at least on the 'var...', 'sum += i' and 'count++' statements, and preferably at least once per pass through the for loop (before or after evaluating the condition). Is it currently possible to do this with SpiderMonkey? If not, does anyone have any thoughts on how hard it would be to adapt SpiderMonkey to this task? I really would like to use SM, I just need to get it to jump through hoops the way we tell it to :> -- Corey Murtagh The Electric Monk "Quidquid latine dictum sit, altum viditur!" .