Subj : Re: JavaScript debugger from C++? To : netscape.public.mozilla.jseng From : Mike Moening Date : Thu Feb 24 2005 11:07 am I'm using SpiderMonkey directly. I'm doing stuff like this: rt = JS_NewRuntime(0x100000); cx = JS_NewContext(rt, 0x1000); global = JS_NewObject(cx, &global_class, NULL, NULL); JS_InitStandardClasses(cx, global); /* register error handler */ JS_SetErrorReporter(cx, printError); Then I add classes with calls to JS_InitClass... etc... It seems to be working great. Ideally I'd like to debug an instance of a spidermonkey from a remote machine. like this: 1) Connect to machine for debugging and register myself as wanting to debug. 2) Pick remote scrips for debugging. 3) Set breakpoints in those scripts by viewing the source remotely. 4) Wait for remote spidermonkey instance to run the scripts and fire the break in my local debugger instance. 5) Step through code etc.... I'm an accomplished C++ guy with many years under my belt. I'm thinking sockets for the registration and back and forth talk. However I really do NOT want to write the front end debugger. I've seen Venkman but that seems like it wouldn't be usable without having a browser around. I'm hoping for a since front end that I can extend for my purposes (the initial picking of scripts to debug and registration etc..) Right now I'm basically "lost" trying to figure out what is what... Thanks! "Jens Thiele" wrote in message news:6t9kvc.as2.ln@karme.myfqdn.de... > Mike Moening schrieb: > > How can I use Venkman directly from a C++ program where I have spidermonkey > > embedded? > > I'm looking for a way to add debugger support to the C++ application which > > is running the JavaScripts. > > > > If this is not possible what other options are there? > > I want to continue to use SpiderMonkey if at all possible because of cross > > platform support. > > > > Thanks! > > It depends on how you embed SpiderMonkey. If you use the SpiderMonkey > API directly you can use the debugging part of the API. > For an example you might wish to look at Shanti Rao's jsdb > (). > > Greetings > Jens .