You can use the Script panel to view and debug your JavaScript code.
There are several ways of how you can debug your code:
- Setting a breakpoint
- Using the
debugger
keyword - Using the Break On ... feature
In all these cases the script execution will stop at a specific line, from which you can step through each instruction to debug the code.
How you do that is described in more detail on the Firebug wiki page.