When the Console panel is enabled in Firebug, there’s a drop-down menu at the top of the panel that controls what shows up in the Console, such as CSS and XML errors, whether to turn on strict warnings, or to open a larger command line. The command line is a small line at the bottom of the Console panel, as shown in Figure 10-11.
The Console command line is a way to enter Console commands (naturally). The command line isn’t for the inexperienced, but it can be a quick way to work your way around the DOM. It also has an “autofill” capability: if you start to type in a DOM element, as shown in Figure 10-12, and hit the tab, you can cycle through options at any point, hitting the return when you find one you want.
When you want to finish the profile, use:
In the profile tab for the Console panel, you can see the named profiles, and if you click on each, see where time was spent in the application, as shown in Figure 10-13.
There are other Console object API methods, including
console.log to log messages,
console.count, which prints out the number of
times the line with this command is executed,
console.timeEnd, to set up a timer to test
execution time for a block of code, and so on.
Best of all, as we’ll see later, other browser debuggers have also implemented at least partial support for the Console API.