Subj : Re: Step-by-step execution... To : Corey Murtagh From : Brendan Eich Date : Fri May 23 2003 11:36 pm > 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 :> > Have you used Venkman (the JS debugger, built on SpiderMonkey -- it supports single-statement stepping among other things), or checked out the JS debugger APIs? http://www.mozilla.org/projects/venkman/ http://lxr.mozilla.org/mozilla/source/js/src/jsdbgapi.h http://lxr.mozilla.org/mozilla/source/js/jsd/ I'm cc'ing Rob Ginda, creator of Venkman, who can probably say more. /be .