Subj : Re: JS_GetFunctionId for an anyomous function To : netscape.public.mozilla.jseng From : Mike Moening Date : Tue Mar 29 2005 05:00 pm We rulled out Vehkman a while back in favor or writting our own. We are writing "JSMonkeyWrench" as a open source browser based debugger to run on IE or Firefox. It has a simple HTTP server inside for handling normal web serving duties and also XMLDataRequests from the front end debugger. The idea is to provide a simple drop in debugger that can be customized to the needs of the spidermonkey embedder. To the end user it will consist of a single C++ class with a few simple methods and no dependancies (other than a threadsafe monkey). Lightweight, fast and as powerfull as vehkman. The venkman code is a little over-complicated (who wants to build the entire mozilla source tree), it crashes a lot, and breakpoints don't work right may times. The build environment on windows is also really messy. Also, there are too many layers before you actually get to spider monkey. That makes it difficult to figure out whats going on. I've been pouring over and grepping the source as much as possible. I've learned some tricks and bad habits but nothing really helpfull yet. Questions on JSD seem to go unanswered for the most part and I can't find any outside examples of anybody actually using it. So here I am... Ok...back to the topic at hand. So now that I know I have to do it the hardway.... How do I get the current line of source that contains the function declaration from the newscript hook? Can I convert the starting line to a PC and get the source line from the PC? Sorry for being such a pain. You've been a great help. Mike M. "Brendan Eich" wrote in message news:4249D7AF.7060503@meer.net... > Mike Moening wrote: > > There must be a way since venkman appears to do able to do it. > > It shows the anonymous functions in bracket under the script file name: > > > > [execute] > > [setN] > > > > Any sneaky back handed way other than parsing the source line by hand? > > > I don't know how venkman does it, but it's a debugger -- it can use > expensive, even only partially accurate heuristics to good effect. The > engine cannot. Are you still writing your own debugger? Why not use > venkman or learn from it? > > /be .