On 02/05/2013 01:38 AM, Miles Thornton wrote: > I currently embed Spidermonkey 1.8.5 in our software (mostly written in C). > I also implemented a basic debugger using JSDBGAPI > (https://developer.mozilla.org/en-US/docs/JSDBGAPI_Reference ) > Is this what you mean by jsd below or is that something different? > If it is the same thing then is there another C/C++ based API that can be > used in the future? > i.e. Will my debugger still work in a newer Spidermonkey release? > > I have seen the documentation for the new JS Debugger API > (https://developer.mozilla.org/en-US/docs/SpiderMonkey/JS_Debugger_API_Guide ) > which says: > > The new JavaScript Debugger API introduced in SpiderMonkey 1.8.6 provides a > convenient, easier-to-use API than the old JSDBGAPI for implementing > JavaScript debugging features > > but this is JavaScript rather than C/C++ > > Is someone able to clarify this? > I'm afraid the news isn't good. JSD is the implementation of JSDBGAPI, and JSDBGAPI will be removed along with JSD. The new debugging API is entirely in JS. It's not "convenient [or] easier-to-use" from C, but it is much easier to use from JS, more powerful and safer than JSDBGAPI, and supports the JITs (although it does inhibit optimization).
The design spec for the new "Debugger" API is here: https://wiki.mozilla.org/Debugger Here are two YouTube videos that provide a decent overall introduction. (The sound quality on the first is terrible; I'd like to re-record it.) https://www.youtube.com/watch?v=WKIkOcuVG7w https://www.youtube.com/watch?v=mT-6IQB4vi4 If you're game for a rewrite, implementing a command-line debugger in JS using the new Debugger API is not very much work. Jason Orendorff wrote the toy debugger used in the first video; it's about 500 lines of code, almost entirely about printing things nicely and parsing commands. The actual debugging hair is managed entirely by Debugger. Code is here: https://github.com/jorendorff/jorendb If you take a look at the videos, at least, I think you might conclude that making a fresh attempt in JS is worth a shot. _______________________________________________ dev-tech-js-engine-internals mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

