Archive for January, 2009

Chromebug 0.5 context menu

Friday, January 30th, 2009

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:

Chromebug 0.5a1 on Firefox

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)

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

  • the HTML  panel to show the elements of browser.xul as rendered by Firefox;
  • CSS will list the CSS files in browser.xul;
  • Script panel will show the JS files loaded in to browser.xul;
  • DOM will be document object for 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).


Chromebug gets mail

Wednesday, January 28th, 2009

Here’s sneak peek at Chromebug 0.5a1 running on Firefox to debug Firebug:

Chromebug 0.5a1 on Firefox

and here it is running on Thunderbug 3.0b2:

Chromebug 0.5a1 on Thunderbird

Starting with version 0.5a1, Chromebug needs to be started by using the command line option -chromebug rather than the previous -chrome<chromeURL> method.  (Thanks to Ben Smedberg for this suggestion and others for help in working out the details).

Chromebug 0.5a1 can inspect Firefox and Thunderbird, and in debugging Firebug I can set breakpoints and look at DOM state. Single stepping does not work yet, and some things don’t work in Thunderbird because of things like DTD and CSS files from the ‘browser’ name space.

This version introduces a new ‘package’ based approach to the UI. It will take some time to fill it out and explain how it works.


Firebug Releases: 1.3.1b1 and 1.4.0a12

Wednesday, January 28th, 2009 has released four new versions of Firebug.

  1. 1.3.1b1 fixes a number of bugs found after 1.3.0 went up on and includes even more locales. Bug fixes include the scope of the command line, various console or command line not ready problems, tab completion in the command line, and file locking.
  2. 1.3X.1b1, same as 1.3.1b1 but with FBTrace, the firebug tracing support to diagnose Firebug problems.
  3. 1.4.0a12 includes all of the bug fixes from 1.3.1b1 and more that could not be applied to 1.3 branch.  In addition this release has a preliminary version of search-across multiple files contributed by the awesome kpdecker; we’ll probably have to back out some of the UI before 1.4b1 however.
  4. 1.4X.0a12, same as 1.4.0a12, but with FBTrace.

The 1.3.1 release mainly targets users affected by the bugs so we can get some feedback and see if we may have also resolved some issues without test cases but that sound similar to things we’ve fixed.

The 1.4.0 release is on target to be the best Firebug ever. And hopefully this alpha will make up for the unfortunate a11 release which had a number of problems.


Firebug Feature: Without Security Issues

Wednesday, January 28th, 2009

Firebug 1.2+ in Firefox 3 provides no known path for malicious attack by rogue web sites.

Recently Wladimir Palant wrote a nice long post on Displaying web content in an extension – without security issues. In the lead paragraph describing security vulnerabilities he points to a really old posting about an old version of Firebug:

pdp discovered a similar issue in the Firebug extension that uses an HTML-based templating system and forgot to sanitize some input received from the webpage.

If you read through these ancient scrolls you will find Joe Hewitt’s post about the fix. But that fix was way back before version 1.0.5 was out, so none of that old stuff matters today.

While working on Firebug 1.2 we analyzed Firebug for security issues. As a result we reimplemented the Firebug console and command line and Blake Kaplan added new features in Firefox 3 to complete the process.

Firebug works with web pages in so many ways that we have to consider security issues all of the time.  We do take security seriously and we won’t release any version that has known holes.


Firebug Internals: tests online

Wednesday, January 14th, 2009

We finally managed to the Firebug’s test cases on-line.  These directories mirror  the fbug svn project tests directory.

Often users will have a sequence of Firebug operations that fails for them, but we need a page to try the sequence.  Now when a user has a bug report without a test case we can offer some example files for their test procedure.

The test cases fall into three categories:

  1. tests/issues: user reports converted to demo the bug; numbers match the issue list.
  2. tests/unit: our ever growing fireunit test suite.
  3. tests/<panel name>: demo cases for features

Thanks to robcee, reed and the Mozilla team for this support.


Firebug Releases: Firebug 1.3.0

Monday, January 12th, 2009

Robcee released Firebug 1.3.0 to

There are a couple of good blog entries already, one from the pyroentomologist himself and another on ars technica by Ryan Paul.

1.3.0 was originally planned as a stop-gap release to solve unfortunate “double load” problem.  Since the earliest Firebug versions, source files were called up from servers by a second load. As we added more an more features to Firebug, users loaded source more often, and some of those users have servers that count every single page load.  Nothing like debugging your shopping cart app when the debugger orders an extra copy of everything for you! We couldn’t fix this easily, until Honza found and help push out a new nsITraceableChannel into Firefox 3.0.4.  We targeted  our beta for 3.04 to help folks with a critical need and now its official 1.3.0.