Chromebug 1.7a1
Tuesday, August 31st, 2010getfirebug.com has Chromebug 1.7a1, a release of the debugger we use on Firebug. Firebug 1.7a1 should be installed first. For more information on using Chromebug see the Chromebug User Guide.
jjb
getfirebug.com has Chromebug 1.7a1, a release of the debugger we use on Firebug. Firebug 1.7a1 should be installed first. For more information on using Chromebug see the Chromebug User Guide.
jjb
getfirebug.com has Chromebug 1.6a10, the Firefox extension debugger we use for Firebug.
Please note
jjb
getfirebug.com has Chromebug 1.6a7 and Firebug 1.6a7.
Yes, I know we just had Firebug 1.6a6. But Chromebug had one problem left to fix: the context did not restore correctly after restarting. After working all afternoon I tracked it down to a line in Firebug.
Plus the Firebug command line in 1.6a6 was broken if you used NoScript. What? NoScript and Firebug? Hey it happens.
This version of Chromebug has a big clean up in the code. Some highlights:
I’ll do a post with screen shots on these soon.
jjb
getfirebug.com has Chromebug 1.6a5. As usual, this release should be used (only) with a matching Firebug version, 1.6a5.
jjb
Later this evening getfirebug.com will have Chromebug 1.6a4.
Overall I’m more confident of this version that any in a while.
Also available is Firebug 1.6a4. About 10 tests fail, but I don’t know how to fix them. In these cases Firefox generates errors messages without file names, line numbers, or call stacks. I don’t know if we really have test failures or not.
jjb
Please followup on firebug newsgroup or the chromebug newsgroup
getfirebug.com has Chromebug 1.6a3. Please update to Firebug 1.6a3 at the same time.
This version add some support for “Sandbox” scopes used by jetpack. Lots of bug fixes so generally it’s starting to work better again.
Inspect is working well, but one problem I don’t know how to fix: Firefox 3.6 gets a blank area at the bottom of the page when you inspect.
jjb
I wanted to learn more about jetpack so (duh) I tried to debug a jetpack. In case you’ve not heard, jetpack is a Mozilla labs project to support easy, rapid development of Firefox addons using Javascript operating in an HTML rather than XUL world. You should try the tutorial, it really is easy and rapid!
Well, as long you don’t need to debug. Seems like the debug story is writing to Firebug’s Console.
Can we have a ‘jetbug’, a Firebug-like experience for jetpack? To start we’d need to understand what is jetpack. In part it is a Firefox extension: we should use Chromebug to investigate.
I ran the jetpack ‘boom’ tutorial from the about:jetpack URL. It is very short:
jetpack.statusBar.append({
html: "Boom<i>!</i>"
});
Then I inspected the “Boom” addition to the status bar: ![]()
In Chromebug we can see the implementation markup:
<statusbarpanel contextmenu="_child"> <menupopup></menupopup> <iframe type="content" src="data:text/html,Boom%3Ci%3E!%3C/i%3E" style="overflow: hidden; height: 16px; margin-top: 2px; margin-left: 4px; margin-right: 4px; width: 30px;"> </iframe> </statusbarpanel>
So they put an iframe into the status bar to support HTML! Cool.
Next I want to find the Javascript above. I did not get there yet, because Chromebug got confused by seeing a scope that was not a Window or BackstagePass. After some uh, logging based debugging of Chromebug, I can now see the Jetpack “Sandbox” object:
The console looks like an interface to Firebug. You can see the jetpack object used in the tutorial. Also in the sandbox is some jquery stuff and system functions.
Unfortunately there are ten other sandboxes whose role I don’t understand and I can’t find the source shown above. But it’s a start. (Chromebug 1.6a3 will include what I’ve learned so far).
jjb
getfirebug.com has Chromebug 1.5a4. Chromebug is the Firebug code adapted for XUL applications. It is the debugger that Firebug developers use to develop Firebug. Note: you must install Firebug 1.5 as well as the Chromebug XPI. .
If you have looked any previous released version of Chromebug you will see a lot of changes. Some of these are inherited from Firebug. Others are improvements in Chromebug itself.
The key features that we use routinely and that work well:
It is also a fun tool for poking around under the covers:
Problems areas:
Finally Gerv helped set up a newsgroup, mozilla.addons.chromebug. I welcome suggestions and comments there.
jjb
If anyone is interested in a small but high impact project involving Firefox C++ code for Firebug, take a look at [Bug 503007] Provide Javascript Access to User Agent Style Sheets. It involves extending an existing interface, so most of the work is in understanding how to create a patch consistent with the Mozilla coding requirements and in creating the matching test cases to pass review.
The feature would allow Firebug and Chromebug to support User Agent Style sheets properly.
jjb
Since my first post on Chromebug 0.5a1 netted a nice offer from davida, it’s time for a sober look at the new UI. Here’s a reminder of the top part of the UI:

Let’s start at the top right, the “context” menu. This is the main selector for the rest of the UI. Each entry on this menu is a global scope, usually the thing Javascript developers think of as window. Here is the top part of my context menu now:

Context Menu example for Chromebug 0.5a1 (top part)
At the top is browser.xul, the window for Firefox. Below that are four Firebug windows. Two are the browsers Firebug uses for its main panel and side panel. Firebug’s HTML templates (domplates) fill these windows. Two are the inner and outer window for Firebug’s tracing console.
Below that we have the Error Console window (I usually run with -jsconsole) and then the hiddenWindow. All of these are nsIDOMWindows.
Selecting any of these will cause the lower part of the Chromebug UI to fill with content from the corresponding scope. For example, selecting browser.xul will cause
browser.xul as rendered by Firefox;browser.xul;browser.xul;browser.xul.(The Console and Net panels may show something, I don’t know yet).
Most of the time this will be great. The DOM panel should work well because its all about scope. HTML should be good if you understand how to work with windows in chrome code. Script may be more confusing. Javascript can be compiled in to multiple scopes. For example, Firebug files are in both browser.xul and in traceConsole.html. Also Javascript in one scope can operate on content in another. For example, Firebug has no scripts in either panel window, it just puts content in those windows. And finally, the total number of files in browser.xul can be large, leaving you drowning in stuff you aren’t interested in seeing.
Chromebug has some facility to help with these issues. Next time we’ll look into these, as well as ponder the contexts I cropped off the bottom of the menu. If you want to play in the mean time you can try Chromebug 0.5a1 (you also need Firebug 1.4a12).
jjb