The Missing Prompt

Monday April 17, 2006
I don't often write about other people's software, but some is just so good that it bears mentioning.

The FireBug extension for Firefox is just such a product. If you are involved in the creation of any javascript code at all, you must download it now.

Firefox is fantastic as a browser, but a terrible environment for creating and debugging JavaScript. The usual workflow for testing a new snippet is:
  • Open your editor
  • Write some HTML.
  • Include some <script src="..."> tags.
  • Write some JavaScript
  • Switch to browser, reload. Nothing happens.
  • Force reload. Aah, there we go.
  • Notice erroneous behavior
  • Edit JS.
  • Reload... no, damnit, force reload.

Firebug takes that down to:
  • Type some JavaScript

I am tempted to wax poetical about this for longer, but I can explain it better with a screenshot than words:


To be clear: expressions and statements are executed in the page's context, with chrome's protection level. (That means you can do stuff like turn off the menubar and fullscreen the window from this prompt, functions not generally available to page scripts). You can directly inspect your existing JavaScript objects without having to resort to proliferation of alert() statements. As the ">>>" prompt may imply, it works a heck of a lot like Python's interactive interpreter.

This extension really is an absolute must-have for any web developer. It has been critical in improving and debugging Athena.