Archive for August, 2009

Firebug 1.5a22

Friday, August 28th, 2009 has released Firebug 1.5a22. The version fails three tests (console/1693 POST gets 500 from server, net/2221, non-english characters, and netPanelSearch).  I believe the first two are a config problem on I have no excuse for the third one other than it’s Friday afternoon and we’ve been trying to get this version out for a week.We’ll fix these and try to get another release early next week.

This version was tested on Firefox 3.5.2 and 3.7 nightly 20090828 using

  • Issue 2220: Support On by default with Off by user control
    • Removes “Off for all Web Pages” status bar context menu option
    • Add Clear Activation List menu item
  • Increase the target area of the minimize and maximize buttons; remove the “off” label.
  • Issue 1466: Changing any User Agent CSS makes firefox go grazy and after a while crash
    • This fix just prevents the crash, still need UI to tell the user that the rules are not writable.
  • Issue 2237: Net tab – round image size
  • Issue 2230: Copy of Console should not include: Firebug’s log limit has been reached. %S entries not shown.
  • Issue 2243: Feature request – ability to flag custom URLs and preprocess content for JSON parsing
  • Issue 2175: Firebug lacks localization notes
  • jsdIFilter chrome* urls when debugger enables
  • Issue 83: Profiling Greasemonkey scripts
    • sandbox debug contribution by Olivier Cornu (support for greasemonkey)
  • Allow FF 3.7 to run Firebug 1.5 (even if we eventually take it back)
  • Issue 2221: POST variables disappear if they contain non-english characters
    • Note however that the test case for this is currently failing.
  • fix CallStack selection highlight
  • Issue 2254: Html Panel visual and editing problems
    • This contribution by sroussey fixes several problems, esp. around empty tags and editing.
  • Issue 2256: toggleHeadersRow is called on wrong object (contribution by antonin.hildebrand,)
  • Issue 1862: Enhancement :: create xml tab in request item of net tab
  • Issue 2253: Http Resources are loading slowly when net panel is visible
  • Issue 1861: Enhancement :: customize columns of netview
  • Bug 512846 Serious performance issue with Firebug on
    • This partly resolves issue  2187
  • Issue 2210: Image Maps cannot be inspected since rolling back to older version

    • I think this actually went out with 1.5a21.
  • Locale update zh-CN, Chinese (Simplified),bg-BG, Bulgarian


Follow up on the newsgroup please.

Performance problem in Firebug 1.5 (and probably 1.4)

Wednesday, August 26th, 2009

I spent the day looking into

  • Issue 2187: firebug causes memory leaks

I still don’t know if there is a memory leak (or even how to find it if there is), but I sure found a problem. When Firebug’s Error module is active and we load, it takes about 90 sec on Firefox 3.7 nightly build. With the Error module inactive, it’s about 6 seconds.  (On a Firefox debug build the load never completes). The memory goes up dramatically, so my guess it that this is the source of both the excessive CPU time and apparent leaks. Note that does generate a huge number of errors.

For now the only workaround is to disable the Firebug Console (with the mini menu on the Console tab). Firebug 1.5a22 will have a slightly better workaround, it will disable the Error module if you turn off all error and warning settings in the Console.

To find the problem itself may be hard. Chromebug’s profiler did not work, so I’ll fix it and see if that gives some hints.  There is not a lot of code in Firebug’s Error module, so I’m surprised that is the culprit.

Update: the problem was tracked down to the code that assigns error messages to the correct window. In looking through all the URLs for a page, you need to look for imported style sheets.  That is done by looking through all of the rules in a style sheet for import rules. We processed 13,000+ rules, requiring ~1 sec to process all of them. This was done once for each of the 100 errors. So we get 90 sec load time.  A bug was causing us to revisit the same style sheet 6 times  (gmail uses 2318 rules); cutting off the rule search when imports can no long be possible and caching the results brings us back near zero, so the total load time  is now around 6 sec.


Follow up on the newsgroup please.

Firebug Inspect Feature Implementations

Saturday, August 15th, 2009

Since “inspect” is a core and widely used Firebug feature, I wanted to give an update on its status and plans.

The short version: We think Firebug 1.5Xa21 has most reliable inspect ever (esp. on FF 3.5) and we have an even better one in the pipeline.

Some details now. There are 4 versions of the inspect feature:

  1. Joe’s original inspect, plus some minor tweaks. This was in Firebug 1.3. Lots of success; lots of bug reports.
  2. Mike Radcliffe’s ‘body-tag’ version, in Firebug 1.4. Solved problems of Joe’s version; also lots of bug reports.
  3. Mike Radcliffe’s Joe-fix-pack version, in Firebug 1.5. Avoids the body tag problems; no track record yet.
  4. Mike Radcliffe’s Canvas version: Total new approach, in progress.

The first three versions work by injecting content into the web page.  We try not to collide with page content, but the web is so big and various that some collisions happen.  So some pages have inspect offsets, failures, or (rarely) the page is mis-rendered. Because the tags used in 1.3 and 1.4 are somewhat different, 1.3 might fail on cases where 1.4 works and vice versa.

By unfortunately coincidence, changes in Firefox 3.5 make inspect with 1.4 break more often. So Firebug 1.4 on Firefox 3.0 is better than Firebug 1.4 on Firefox 3.5 for inspect. This is what sparked the 1.5 version.

So why don’t we put the 1.5 inspect into 1.4? Because our ability to test inspect is limited give the huge variety of pages.  Users who have problem with 1.4 on Firefox 3.5 can use Firebug 1.5a21 now and we don’t risk breaking users who do not have a problem.

And what about that canvas version? The idea is to create an inspect that does not inject elements in the page. Is it possible? Stay tuned…


Followups on the newsgroup please.

Firebug 1.5a21

Friday, August 14th, 2009

Ok finally we are back on track: has firebug 1.5x.0a21. The hangup was a cluster of issues around running our FBTests. This release is tested on Firefox 3.5.2 against rather than an internal Javascript server.  We need this to test on Firefox 3.6, but it’s also more like real web testing, and its easier to share the test suite.

Other big items:

  • Rob Campbell’s “Computed” style side panel replace the awkward option-based modal Style panel
  • Mike Radcliffe’s Alternative Inspect (more about that another time).
  • Jan ‘Honza’ Odvarko, reimplemented the black/whitelist storage to see if we can make activation more reliable.
  • Early prototypes for CSS Selector search
  • Hans Hillen: a11y support for panel search in CSS, DOM and script panels
  • New locales: fa-IR, uk-UA (Ukrainian), hy-AM (Armenian), pt-PT Portuguese (Portugal),  sl-SI Slovenian
  • Update locales cs-CZ, ja-JP, it-IT Italian
  • Add option  javascript.options.strict.debug false, to support bugzilla 508562

Lots of bug fixes since 1.5a20:

  • Issue 2161: Firebug 1.5 doesn’t allow itself to be installed into Thunderbird
  • Issue 2224: Enhancement: provide some listener to the creation of an entry row in net panel
  • Issue 2079: Setting breakpoint from console error doesn’t work
  • Issue 2107: Master Password dialog stops Firebug from enabling
  • Issue 2158: Two matching styles of which one has two selectors (of which one is more specific than the others) cause firebug to display erroneus style.
  • Issue 289: Incorrect highlighting when inspecting elements of a positioned table with margins
  • Issue 1767: Background image disappears after onmouseover in the html tab
  • Issue 1518: Problem when inspect page with negative z-index
  • Issue 1766: html, body { width: 100%, height: 100% } -> Inspect-Tool does not work properly
  • Issue 1871: table with caption is not overlay correctly
  • Issue 1939: Border on body seems to offset the blue inspector box
  • Issue 1944: Ruler no longer shows any horizontal line
  • Issue 1965: Inspect Tool -> Inconsistent overlay box display over selected element.
  • Issue 1979: Analyze highlight wrong into IFrame inside IFrame
  • Issue 2025: Inspection of html elements in frames has incorrect top/left offset
  • Issue 2052: Inspect doesn’t work on old heavy frameset+iframes webpage
  • Issue 2065: Firebug Inspect Outlines in framesets
  • Issue 2068: Strange error in 1.4.0 – when On it deleted my page whole BODY element
  • Issue 2094: Firebug inspect highlighting renders behind page content, rendering highlighting unusable.
  • Issue 2148: Firebug doesn’t detail changes in Firefox’s updates window
  • Issue 2188: firebug inspect highlights domNode incorrectly in iframe
  • Issue 2205: Inspector offset when body is set to position relative or absolute
  • Issue 2190: `r` identifier leaks into global scope
  • Issue 2195: Translation for fa-IR
  • Issue 2218: cleanup strict javascript warnings in Firebug code
  • Issue 2140: Add newly supported CSS features to CSS panes auto-completion
  • Issue 2011: Firebug console does not stay open when navigating between tabs
  • Issue 2155: firebug windows does not remember maximized state
  • Issue 1821: UI bug:one line script-error reporting
  • Issue 2180: HTML panel should show whitespace and comments
  • Issue 2181: Impossible to examine style in the HTML view without expanding the node
  • Issue 2184: Invalid context in console.js ignored in Firebug 1.4+
  • Issue 568: Computed style and CSS rules should be separate tabs instead of an option
  • Issue 2189: Passing utf-8 text to external editors
  • Issue 1924: Console > Post Truncates
  • Issue 2105: POST Data not fully viewable if a parameter string is wider the the screen
  • Issue 2108: Firebug leaks at least one chrome window
  • Issue 2114: E4X objects can no longer be inspected in 1.4.0 (new XML rep type).
  • Issue 2092: Copy does not appear on context menu in Net panel

Followup on the newsgroup please.


Update locale cs-CZ

Give your eval a name with //@ sourceURL

Tuesday, August 11th, 2009

The first Firebug feature I worked on was a whopper: eval() debugging.  One of the challenges is how to name the source code buffer.

By default Firefox names the eval() buffer using the containing filename. This is a disaster:  it’s the debugger equivalent of overstrike: eval functions overlap orginal functions.

Coming up with an alternative is not so easy. The name has to uniquely identify the buffer to support breakpoints and yet be understandable by developers. The Firebug default is to compute an MD5 hash for the buffer then show the developer a string related to the calling file and the source.

Firebug also supports developer-named eval() buffers: just add a line to the end of your eval(expression) like:

//@ sourceURL=foo.js

This makes the source appear to come from the calling domain at file foo.js. The syntax of the line needs to match this regular expression:

const reURIinComment = ///@ssourceURL=s*(S*?)s*$/m;

sroussey points out that this feature has recently been added to Webkit so it should also work in Safari.


Followup in the newsgroup please.

Watch us while we work…

Tuesday, August 11th, 2009

The Google Code project Firebug uses now supports a feed of SVN changes: Subversion commits to project fbug on Google Code.

Ok, I know, not that exciting. But people have asked it.


Please post followups to the newsgroup.

Firebug fails silently in private browsing mode

Friday, August 7th, 2009

mchung, one of our hard-working Firebug users, just uncovered a problem that I think hit many users:

If you enter Firefox’s Private Browsing Mode, then Firebug 1.4 will not stay open on reload or tab switching.

(See Issue 2011: Firebug console does not stay open when navigating between tabs).

Unfortunately when people report these symptoms, I have been telling them they have to create a new Firefox profile to fix it. And it does fix it, for a while. Until they once again set private browsing mode.

The only immediate fix here will be a warning that part of Firebug fails if you are in private browsing mode. The workaround is simple: don’t use Firebug in Private Browsing Mode.


Followups in the newsgroup please.