Archive for September, 2009

Firebug 1.5a25

Monday, September 28th, 2009 has released Firebug 1.5a25, another feature-addition release.  We are now pushing to finish the 1.5 features so we can get b1 out around the time of Firefox 3.6b1.All of the tests  pass on FF 3.5.3 except the new ones for features not-yet-complete. Two cases fail on FF 3.7, one due to changes in the Javascript line table. We are investigating these.

The big news in this release is the break-on features, not quite ready yet. The new grey border on the left side of DOM and Net panel is part of this change, giving you a hint that you can set breakpoints on DOM property changes and net panel requests. We’ll have detailed blog posts once it’s all working.

This release also has a new implementation of the source viewport in the Script panel. The work was primarily to support Firebug extensions, but it should help in single stepping and single line scrolling performance.  Please report any problem with source views.

  • Initial internal API docs for Firebug extensions:
  • Issue 2297: Reporting failure to load javascript
  • Issue 2294: Searchable: false does not hide the search UI
  • Issue 2277: Dispatch onToggleBreakpoint and onToggleErrorBreakpoint to Firebug.Debugger listeners
  • a11y support for console.profile() output
  • BreakOn: DOM property set, HTML Child Add/remove, element remove, XHR (conditional)
  • Issue 1881: More modularized source box (Reimplement script panel sourceBox)
  • Issue 2328: HTML preview in net-tab but not in console-tab
  • Issue 2234: Break on error bubble weird behavior
  • Add Layout “Show Bounding Client Rect” and make it the default; add position and z-index


Followups to the newsgroup please.

Eventbug Rising

Friday, September 18th, 2009

Honza and I have been working on a new Event panel for Firebug, based on the work by Olli “smaug” Pettay and the Firefox team over on Bug 448602. The events panel will list all of the event handlers on the page grouped by event type. For each event type you can open up to see the elements the listeners are bound to and summary of the function source. The attributes for capturing and Allows-Untrusted are also listed.

The element is link to HTML panel. If you hover on the element in the event panel the corresponding element in the page is highlighted. The function is linked to the Script panel so if you click on it you can, for example, set a breakpoint.

Here is a sneak peak at the UI:


At this time we don’t know what version of Firefox will support this feature, but you can guess that we are begging whenever we get a chance ;-).


Please followup in the newsgroup.

Firebug 1.5a24

Thursday, September 10th, 2009 has Firebug 1.5X.0a24. All tests pass on Firefox 3.5.2; one failure on Firefox 3.7 nightly that we are looking into.

This version introduces support for the network activity observer added by Firefox in bugzilla 488270. This will lead to much more accurate network event timing, but it requires Firefox 3.7.

Also included is an early version of Honza’s “Break on Mutate”, part of our effort to implement “break-on” functions for all of the panels.  You can get early peak by trying the test page (don’t forget to reload).

  • Issue 2280: Problem with xpi built with the ant script
  • Issue 2279: Error Breakpoint can’t be toggled off.
  • Issue 2288: FB hangs and raises CPU to 100% due to getStyleSheetByHref
  • Issue 2281: Breakpoints and jQuery 1.3.2 problem
  • Issue 2187: firebug causes memory leaks


Please post followups to the newsgroup.

javascript.options.strict and performance

Tuesday, September 8th, 2009

I fought another javascript.options.strict problem:

  • Issue 2288: FB hangs and raises CPU to 100% due to getStyleSheetByHref

In case you don’t know, javascript.options.strict is supposed to warn you about problems in your code.  Unfortunately it also warns you about non-problems in you code.  In the particular case above, this line of Firebug code was causing the warning:

return context.styleSheetMap[url];

The intent of this line is clear: return the entry of the styleSheetMap at the key url and if the map has no entry there, return undefined. But the strict option does not like this javascript idiom and reports a warning if the function returns undefined.

(The line above is dubious but for a completely different reason: if the url were accidentally equal to a built-in property of javascript objects, then the function would return an incorrect value).

The bug here is that the strict option has no scope controls and no selection controls: once you turn it on, it applies to the entire browser and all of its rules are active.  So all of Firebug’s warnings and all warnings from other AJAX pages get mixed with the warnings from your web page. And the overhead of processing these warnings can be quite high. I recommend that you set javascript.options.strict false using url about:config or Firebug Console panel option “Strict Warnings” (unchecked).

If you like these kinds of extra checks on your code, take a look at JSLint.  It is well supported, well documented, has lots of options and different ways of setting them, and it can be applied to just the code in your page.


Please post followups in the newsgroup.

Firebug 1.4.3b1

Tuesday, September 8th, 2009 has Firebug 1.4.3b1, a test release of what will likely be the end of the 1.4 line (the tracing version, 1.4X.3b1 should be out tomorrow).

This release fixes one major bug in activation: sometimes Firebug will fail to  remember a site should be open or it will fail to remember a site should be closed.  This bug plagued 1.4 from the time we introduced “Activate Same Origin URLs” as the default activation option.  The cause was simply a documentation bug: we did not realize that the page annotation service deletes annotations for URIs that are not visited.  If you opened Firebug 1.4.2 on, Firebug would mark the URI; if you never visited that URI, the mark would not stick.  Since the results depended on the user’s browsing history or behavior, the bug was not reproducible.  In addition, the buggy behavior got mixed up with UI changes and other bugs so it took us a long time to sort it out.

The fix is not small for a mature and stable version that 1.4 is by now. Honza implemented a new annotation service (it’s a file of JSON strings stored in your profile in the directory named ‘firebug’) and he carried along a number of fixes to the annotation system which we uncovered after 1.4.2. For that reason, we held off releasing this fix. The new service and the fixes have been used on the 1.5 branch for some time. As far as we know, all reports about activation problems in 1.4 have been resolved by 1.5 fixes.  That’s not to say 1.4.3b1 will not have bugs, but the basic code has been tested.

As a side effect, two options changed in the Firebug status bar icon context menu:

  • Removed – Off For All web Pages.
  • Added – Clear Activation List

We plan to release this fix to the very large number of users of the release stream. Since I guess most readers of this blog have more experience with Firebug, we’d appreciate it if you have the beta a spin.

We hope this is the end of the 1.4 activation problems.

Update: Actually “Clear Activation List” is in the Firestarter extension, not in 1.4.3b1.


Followups to the newsgroup please.

Firebug 1.5a23

Wednesday, September 2nd, 2009 has released Firebug 1.5a23. We did a quick cycle to update 1.5a22 which failed a couple of tests.

This release uses a faster algorithm for determining the executable line numbers so the green highlights on the Script panel should show faster on pages with very large Javascript files.

  • Issue 1881: More modularized source box
    • This is part of an effort to support extensions that want to write additional information into or on the Script panel.
  • Issue 2076: Break on error, switch tabs, and return to broken stack trace
    • This is almost a workaround. If you stop on a breakpoint then switch to a page without Firebug active, we suspend the JS debugger. When you return to the breakpoint, the stack is no longer valid.
  • Issue 946: Option on how to deal with tab characters in JavaScript source views
    • Not a common problem, but if you have tabs in your source the rendering was very poor.
  • Issue 2264: Error when setting a conditional breakpoint while console is disabled
    • Also a kind of workaround. If the console is disabled, we can’t evaluate “watchpoints” unless we are stopped on a breakpoint. That is because we currently use the command line logic to evaluate the watch expressions, and that requires the console.
  • Issue 2275: debugger.onError: TypeError: url.substr is not a function


Followup in the newsgroup please.