# Writing to the Firebug console [edit]

This page describes how to add code to write messages to the Firebug console.

## Introduction

Use the Firebug console to log information about a web page.

## Instructions

### Writing to the console

To write messages to the Firebug console:

1. In the lower right corner of Firefox, click the Firebug button to start Firebug.
2. Click the tab to view the Console tab.
3. Place your cursor on the command line (shown below) and type one of the console commands (described below).

4. Press the Return key on your keyboard to execute the command.

### Console commands

Firebug recognizes a number of commands in addition to console.log. See http://www.getfirebug.com/console.html for a complete list of commands.

console.log

Use console.log to write any message to the console. You may use either of the following formats:

    console.log("Hello", postman, "!");

which displays as

    Hello Newman!

or

    console.log("Hello %s!", postman);

which also displays as

    Hello Newman!

You can use the following characters to format your log message output:

- %s = string
- %d = integer (number formatting not yet supported in Firebug)
- %i = integer
- %f = floating point number (number formatting not yet supported in Firebug)
- %o = object hyperlink

See http://www.getfirebug.com/console.html for a full list of console API commands for Firebug.

## Related Topics

- About Firebug
- Installing the Firebug extension
- Inspecting HTML
- Inspecting CSS
- Monitoring XMLHttpRequests
- Editing a web page
- Setting breakpoints in Firebug
- Profiling code performance

Retrieved from "http://aptana.com/docs/index.php/Writing_to_the_Firebug_console"

Category: AptanaHelp