Debug PHP usando Firefox con FirePHP

FirePHP è un  add-on per un  add-on: estende il popolare plugin per firefox chiamato Firebug.


Step 1 Locate the server library

Locate the /lib/FirePHPCore folder in the FirePHPCore archive and move it into your document root.


You can skip this step if you are using PEAR. Make sure the PEAR repository is in your include path.

Step 2 Include the server library

Create a file at /www/Index.php and open it in your editor.


Step 3 Start output buffering

You can skip this step if the output_buffering php ini directive is set to On.

Your first log message

$firephp = FirePHP::getInstance(true);

$var = array('i'=>10, 'j'=>20);

$firephp->log($var, 'Iterators');

Access Index.php via Firefox (e.g. http://localhost/Index.php)

Ensure your Firebug Net AND Console panels are enabled.

You should see something like this:

Note: The File and Line information will only show when you hover over the message.

Hovering over array(…) will show the Variable Viewer.
Click to pin it.

Clicking on the array keys will toggle the values.

>> Now start Using FirePHP for all your needs.

Lascia un commento