blog
discuss
releases
documentation

Development Blog

Firebug 2.0 alpha 2

getfirebug.com has Firebug 2.0 alpha 2

Firebug 2.0a2 fixes 20 issues
Firebug 2.0a2 is compatible with Firefox 30-31

 

The Firebug team is hardworking to make sure version 2.0 is ready when Firefox 30 is ready. Today’s alpha 2 is fixing reported issues and also finishing some features that have been in-progress for some time. We are planning to switch to beta phase soon to get yet more feedback.

Inspect JavaScript Function Return Value

issue 6857

 

This is a great feature that allows to examine and modify the return value of a JavaScript function. See this little example:

function myFunction()
{
    return foo();
}

 

The question is how to examine the return value of foo()? Firebug allows that by stepping through a return statement and displays it within the Watch side panel. It even allows you to modify the return value by double-clicking on it.

 

Let’s go through an example (available online) and see some screenshots describing the user experience.

The JS execution is halted at line 17 and the Watch panel shows some global scopes, but it isn’t clear what the return value is.

One of the new JSD2 features is stepping through the return statement, so if you step over once (F10), the debugger will sit at the same executable line (17), but the current return value will be available and displayed in the Watch panel at this time.

Now you can edit the return value (double clicking on number 100) just like any other variable in the Watch panel. You can even change the type to make the value a string or a JS object. Try it for yourself, install Firebug 2 alpha 2 and load the online test case.

 

Pretty Print

issue 6920 and 1238

 

Another nice feature introduced for the first time is source code prettifying. This feature is available for the Command Editor:

as well as the Script panel source:

 

 

We’d love to hear about how this version works for you.

 

Please post feedback in the newsgroup.

 

Jan ‘Honza’ Odvarko

 

Comments are closed.