Subj : Re: JS_LineNumberToPC question To : Sterling Bates From : Brendan Eich Date : Tue Jun 08 2004 11:20 am Sterling Bates wrote: > I'm using JS_LineNumberToPC to find a valid breakpoint location, and every > time I pass it a line number that corresponds to a line within a function, > the returned jsbytecode points to the beginning of the function. You are passing in the top-level script, so that's the right answer. > Somebody back in 2001 observed that the jsshell does not have this You must mean the JS debugger (venkman). > limitation, but I'm simply unable to determine how it works around the > issue. Any help is really appreciated. Use the function's script -- you'll have to get the function object from the top-level script. I'm not sure the jsdbgapi.h helps here, but see GET_ATOM in jsopcode.h. /be .