Archives For devtools

>My work was interrupted last week by this handsome young man’s birth:

I left off with a review request on the code in hand for bug 534398. Started work on the “global console” data and “placeholder” output UI. I tried using a separate window, but it was a bit disjointed.

Also got some work done on the “global console” storage and various listeners. needs work, but approach is visible.


Add a JSTerm “input” element to the regular console with output directed to the regular console. Fix exception listener so all global messages are written to the “global console”


I was going to try and parallelize the reviews for this work, but, after speaking with Rob Strong about the review process on EM rewrite, he recommended that the review this console work should be comprehensive from a single reviewer. Mossop agrees as well. I have asked vlad for review – until he begins review I will be doing some more test writing and cleanup.

Update: Latest try Build:


>Still plugging away on bug 534398 “Heads Up Display – console”:

Implemented DOM Mutation logging as well as more concise network logging.

Removed all programmatic CSS and started using the css service.

Tweaked the UI to make it more “usable” while under such heavy development.

Implemented a ConsoleStorage module to keep all logging data, as well as make it easily iterable. This is mainly for the “global console”

More work on “JSTerm” or “Javascript Workspaces”




Everything is up to date in the repo:


Need to make each logged message “updatable” by asynchronous but related log messages.

Also need to add an exception listener that can log to the corresponding tab’s “Display”.
Should be straight forward.

Add preferences for turning on and off functionality, etc.

Slowly breaking things out into smaller, stand-alone and tested modules or additional services (maybe) – to make review easier.


Need to get feedback and start reviews on the various bits: HUDService, HeadsUpDisplay module, storage module, JSTerm module.

Update: Latest Try Builds are here:

> Closed bug 545266 and bug 546708 – toolkit and browser “scaffolding”

Heads Up Display, console (bug 534398): I have gotten a try-server build to work. It is not pretty, but it works. You can call console.log(“I am a log message”); from content and it works. The API follows Firebug: console.log, console.warn, console.error,

I am re-factoring things right now to move most functionality into toolkit as well as isolating things out of a jsm and into 2 components.
Setup a user repo at:


Pretty current try build is here:

Url to test try build is here:


More refactoring, hoping to ask for a review on monday from Mr. Mossop.

> The current console patches are found on bug 545266 and bug 546708 – also try builds will start once things are actually usable – I hope end of next week. It turns out that trying to attach (and keep attached) an arbitrary object on a nsIDOMWindow is a it of a pain – from outside the window’s constructor. sicking told me about his patch for detecting new windows (before content scripts run) and attaching objects to them: bug 549539 – which landed late today. Yay. With this patch on trunk it should be trivial now to detect window construction and attach a console.


Work with the new window detection hooks to implement the observer that keeps window consoles re-appearing. Every load of the browser creates a new nsIDOMWindow – news to me, anyway.


I may need some initial “WIP CSS” help to pretty up the logging output. I’ll try my hand at it next week after I have gotten the initial event handling worked out.

>I am currently working on some “baked in” developer tools for web and extension developers.  This is the current status on the “console” piece.

Republished from the Mozilla Status Board:


Spent the entire week on DevTools: “HeadsUpDisplay” bugs (bug 546708 and bug 545266). I have pretty much completed the work on these bugs, and will be filing new ones for the next phase, which is writing xpcshell tests for the HeadsUpDisplay service and browser chrome tests for what is part of the browser UI and Javascript module (HeadsUpDisplay.jsm).

The only gotcha is my attempt to make “contentWindow.wrappedJSObject.console = new Console();” to actually work.

I thought I had it working, but the wrapper is not working from content scripts. In the meantime I can write tests from the chrome side to make sure my internal methods are doing the right thing.

Worked with Mak on bug 543888 “Places API skeleton (API design)”

Worked on a CSS bug for Linux: Progress “Line” indicator for background loading tabs bug 544818

More of the same. Plan on revisiting “Update action” bug 538331

Ask mrbkap about my use of wrapedJSObject