Re: venkman and stdout

Alexis Nikichine <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Robert Ginda wrote:

> That'll slow things down quite a bit, but shouldn't be too difficult
> otherwise.  Try creating a file with the following contents...
> 
> function dumpframe(frame)
> {
>      dd(formatFrame(frame));
> }
> 
> Then in venkman, /loadd file:///path/to/file.js, and /evald
> console.jsds.interruptHook = dumpframe.  To stop the dumps, type /evald
> console.jsds.interruptHook = null;
> 
> You'll probably want to add some appropriate filtering.  See
>
http://lxr.mozilla.org/mozilla/source/extensions/venkman/resources/content/venkman-debugger.js#1774
> for the implementation of formatFrame.
> 
> You'll also have to enable javascript dump output for dd() to work.
> 

Oh great. Well, not so. I could not have dd working (never heard of it,
btw), and interruptHook expects a jsdIExecutionHook object, etc... but
could reach something decent anyway; Well, I still have to format the
frame, and have screens filled with [xpconnect wrapped jsdIStackFrame]
stuff, but I feel quite near to my goal

That won't keep me asking my next question : is it possible to access this
console.jsds.interruptHook functionnality when running the script from
xpcshell ? Looking for a text mode Venkman ? Me ?? :-)


Alexis

PS. Your answer opened my eyes as to the power of this debugger!

-- some domain is free
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.