Thanks to Gijs and Mnyromyr (and not to me; I didn't write a single line of code), Venkman's met three of the six bullet points I listed in my initial Venkman planning post. It is now at least minimally useful for Gecko 1.9 code.
I would strongly encourage Firefox developers (and for that matter, most of us who hack on trunk) to launch the JavaScript Debugger at startup (command-line argument is -venkman), and turn on "Stop for Exceptions". You'll find a few pain points pretty quickly. My personal favorite looks something like this:
try {
var foo = myObj.property.QueryInterface(Components.interfaces.nsIFoo);
} catch (e) {};
This code is wrong, in my opinion, on three levels:
var foo = (myObj.property instanceof Components.interfaces.nsIFoo) ? myObj.property : null;
I'm not intending to point fingers, but autocomplete in the URL bar is an extremely visible case of this being a problem for Venkman...
Time is running out for any of these changes we want to get into Firefox 3. If we're fast enough, though, we can clean up a lot of these useless "noise" errors which discourage people from using Venkman - and thus make exceptions it catches more relevant to whatever problem the user is debugging.
Thanks!
Posted by WeirdAl at September 24, 2007 8:21 AMIt is saddening if code like that passed a review. :-(
(From Alex: Why? For the most part, this doesn't affect users. It only becomes a problem when you debug. Of course, I debug a lot. So for me, it's painful, but most people won't notice.)
Posted by: Lee at September 24, 2007 10:17 AMMost folks are testing minefield (or granparadiso) builds which sadly don't come with venkman. Top of my list would be building venkman into minefield and making nightly builds of venkman available to install into grandparadiso.
(From Alex: For Venkman XPI's, talk to Robert Kaiser.)
Posted by: Jonathan Watt at September 24, 2007 11:17 AMI started doing what you've said one hour ago and I've discovered that the life is not so sweet...
I've discovered that it would crash while trying to comment here.
The autocomplete code is full of exceptions and EnterMatch is likely to crash if debugged:
https://bugzilla.mozilla.org/show_bug.cgi?id=397435
Due the cyclic collector...
Posted by: Asrail at September 24, 2007 6:15 PM