Subj : Re: JSErrorReport->linebuf .. Help!! To : netscape.public.mozilla.jseng From : j Date : Mon Feb 21 2005 03:07 pm On Mon, 21 Feb 2005 10:43:52 -0800, Brendan Eich wrote: >j@j.jp wrote: >Sorry, the docs lie (yet again). This was never true, the writer just >made it up AFAICT. Patches welcome >(http://lxr.mozilla.org/mozilla/source/js/docs/). > Bummer, I was afraid this was too good to be true. :( >> My other question.. When using the js callback to step through a >> script, is it possible to get each line of source code that is >> executed, so I can create some sort of debug dump? (not compiled >> opcode, but the actual source line being executed) > > >I'm not sure what you mean by js callback, but the JS debugger, venkman, >can show you which line you're on as you single-step, so yes: this is >all possible. See jsdbgapi.h and the mozilla/js/jsd/ directory that >layers a higher-level API on top of jsdbgapi. > >/be I'm sorry, I explained that poorly (and from memory). I am using JS_SetInterrupt() for my scripts, so I can step through them and do a lot of behind the scenes stuff (as needed). One of the passed params is: jsbytecode *pc Is it possible, from here, to get the source line of code, without going back to the source file manually and moving down X lines and grabbing the source? (This is not possible in my application.) I will check out the JS debugger files, and see if I can garner anything from there, but I seem to recall trying this once before.. Thanks Brendan! --Paul .