Re: JSD: Stepping by line

Adam Peller <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
James Ross <silver <at> warwickcompsoc.co.uk> writes:

> This shouldn't detract from the fact that having JSD do some legwork 
> instead of all/most JS debugging FEs is always an advantage.

+1  In particular, I was concerned about the relatively complex logic that every
debugger implementation has to go through to achieve stepping out/over/into --
presumably the same logic in each implementation.  The lazy programmer in me
wanted to just push this down a level in the stack to the JSD, but I gather the
JSD was kept intentionally light?  But would moving this down the stack (perhaps
into SpiderMonkey itself?) make the stepping logic any simpler or the code more
solid?  For example, would you be able to make use of internal states for stack
frame changes rather than compare line numbers, etc.?  Forgive my ignorance
here, I really don't know much about JSD or SpiderMonkey.

In terms of performance, I'll just point out that if an XPCOM boundary is
crossed in jsd (and I'll admit this is far from the norm), making that callback
is far more expensive.  I can say it's still not visibly slow to step through
most code this way, but it's clearly something that would perform better if done
on the same end as the JS engine.  To add to the fun, we're playing with Java
XPCOM over RMI to do remote debugging.  Perhaps if we go through enough levels
of abstraction, the performance loss will become obvious :-)

-Adam
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.