You _are_ familiar with DumpJSStack() in the C++ debugger, right? If not, I recommend becoming familiar with it...
Posted by Boris at March 25, 2006 7:43 PMOh, and the reason you're getting a mutation is because you're touching a node from JS, which forces XBL binding instantiation, which constructs the binding's anonymous content, which sets attributes on it. Now the real issue is why mutation events on anonymous content bubble out past the bound element. That's a bug we should fix, I think. There's been some discussion about that recently.
Posted by Boris at March 25, 2006 7:45 PMThis shouldn't do too hard to do with Eclipse. For example Eclipse can already mix Ruby and C debugging. Eclipse had a nice Javascript editing engine (WST). It can syntax highlight and pick out all of the functions and variables. All that is missing is a Java class for querying the JSEngine debugger. Since the Eclipse team uses the Mozilla source code for a test case this class may already exist.
Posted by Jon Smirl at March 25, 2006 7:50 PMProject seems to already be underway.
http://www.eclipse.org/proposals/atf/
ATF Tools
Note that the initial contribution focuses heavily on the use of Mozilla because the Mozilla system offers cross-platform interfaces to enable such things as JavaScript Debugging. However, as a framework, ATF exposes a prototype API that would allow for the incorporation of arbitrary browsers with comparable function as they become available.
* Enhanced JavaScript Editing Features
o Batch and as-you-type syntax validation
* JavaScript Debugger
o Tight integration with Eclipse debug UI to provide flow control in browser runtime and the ability to examine JavaScript code and variables
* Embedded Browser
o Access to browser's DOM, e.g., Mozilla XPCOM
* DOM Inspector / JavaScript Console
o Mozilla tools integration for DHTML developers as Eclipse Views.
The ATF project uses gdb for C++ debugging, and jsd through xpcom for javascript. This means that on windows you can't debug mozilla C++ code (unelss you opt for mingw compile). On Linux there is hope. You could have a C++ & JS debuggers running simultaneously, with an Eclipse extension that syncs them. Something along the lines of making one debugger break when the other one does, and the ability to sync stacks. If there are utility routines in the mozilla code that allow you to match stacks, integrating these two would be a week or two worth of work.
Posted by Aleks Totic at March 27, 2006 10:16 AM