Setting breakpoints

"Dassburger" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Organization http://groups.google.com
Message-ID <[email protected]>
Hello.

We're using SpiderMonkey as an interpretator for embedded script
language in one of our projects. Right now I'm writing a debugger for
it. I have a problem with setting breakpoints while no scripts are at
active execution. User wants to open some script in the debugger, set
some breakpoints and execute it. How to set execution hooks with JSD in
such situations? JSD_SetExecutionHook requires JSDContext, JSDScript
and PCs, but they are not available before the script starts to
execute.

I tried to solve this by storing breakpoint lines and setting a hook at
the start of toplevel script execution. In the hook handler
JSD_SetExecutionHook is called for each breakpoint. But again, there
are problems, as toplevel code, and code inside functions belong to
different JSDScripts and I have no idea how to figure out which line
belongs to which script.

Could someone explain me The Right Way to work with JSD, please?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.