Tag: FirePHP

2009-07-15

Debugging with FirePHP

by Charles — Categories: Debugging, PHP — Tags: , , , Leave a comment

I just discovered FirePHP today (via a discussion at PHPBuilder.com), a set of PHP classes along with a Firefox add-on which allows you to debug your PHP scripts through the Firebug console (a separate Firefox add-on you’ll also need to install if you haven’t already done so).

Essentially, what it does is allow your PHP server-side scripts to output debug information to your browser via a set of HTTP headers which are then intercepted and displayed by the Firebug console window. This way, instead of doing a var_dump() or print_r() to view a variable or object in the middle of your HTML output (or routing it to a log file on the server), you can view that info separately in the Firebug window.

Here’s a quick example of the most basic usage:

(more…)

© 2012 PHP Musings All rights reserved - Wallow theme v0.46.4 by ([][]) TwoBeers - Powered by WordPress - Have fun!