Re: Setting breakpoints
"Dassburger" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.jsdebugger |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
James Ross wrote: > Dassburger wrote: > > 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. > > You're close - the right way is to set it when the script that contains > the line is loaded using script.baseLineNumber and script.lineExtent. > > The debugger notifies you of each script as it is loaded (top-level > always comes first), and you just need to set the breakpoint in each > that overlaps the line (you can check if the line is executable within > that script, but I don't think you have to). How to check the executableness of a line within a script? > -- > James Ross <[email protected]> > ChatZilla Developer