Joe Hewitt

FireBug 0.4: Come and Get It

FireBug 0.4 is now available for download! Install it here:

http://getfirebug.com

Since I first blogged about this release in early April, hundreds of people have emailed me to volunteer to test FireBug 0.4. The response was simply overwhelming. Thanks to everyone who helped out - your feedback went a long way towards making FireBug better.

Read the release notes for a detailed list of changes. Here are some of the highlights:

JavaScript Debugger

You can now set breakpoints in JavaScript code, step through it line by line, and inspect local variables and the call stack.

Stack Traces with JavaScript Errors

A stack trace is now included with each JavaScript error that appears on the console. This answers the question that inevitably arises after you see an error: what functions were being called when this error occurred?

Debug JavaScript Errors

Seeing the stack trace is nice, but sometimes you want more information. You want to see the value of every variable, and you want to see what happens when certain lines are executed. For these situations, check "Break On Errors" in the Debugger options menu. Each time an error occurrs, the Debugger will stop your code immediately and take you to the source of the error.

console.log

If you want to log text to the FireBug console, you no longer need to add the "printfire" function to your code. FireBug now makes an object named "console" available to every web page. To log text, simply call console.log("some text").

Logging Levels and Assertions

In addition to console.log(), there are a family of functions that let you describe the meaning of each message. These are console.debug(), console.info(), console.warn(), console.error(). In addition to being visually distinct, these functions also show you the line number where they were called.

There are also a set of assertion functions that give you a nice way to show a very informative error message when something unexpected happens.

printf-like String Formatting

When you call the console logging functions, you can use printf-style patterns to replace parts of the string. You can even create links to objects that let you inspect the object when clicked.

Read the documentation for more information about the available patterns.

Finally, I must thank Jamey Boje of graphicsguru for voluntarily creating a beautiful logo for FireBug.