WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I'm simply supposed to call fb('Error message','Lable') but it doesn't work all the time. I can't figure out when and where the relevant files are being included and classes defined in order to make the call to the said method/function.

For example it doesn't work even when I call fb() from wp-content\plugins\wp-firephp\FirePHPCore\fb.php itself and open up http://localhost/wordpress (maybe because the file never gets included) but it works on http://localhost/wordpress/wp-admin. Does that mean wp-firephp plugin only works for /wp-admin and related pages? Because I wanted to use its functionality on non-admin related pages like /footer.php and such. Am I doing it wrong?

share|improve this question
up vote 5 down vote accepted

I gave up on using the plugin and use FirePHP straight as a mu-plugin:

FirePHP mu-plugin

And firebug.php file consists of:

    Plugin Name: FirePHP
    Version: 0.1

require_once( 'FirePHPCore/FirePHP.class.php' );
$firephp = FirePHP::getInstance( true );

function logit( $var, $title='From FirePHP:' )
    global $firephp;
    $firephp->log( $var, $title );

Then I call it from anywhere (theme, plugin, core) using the function:
logit( $var_to_debug, 'The var contains:' );

share|improve this answer
While using this method have you had any problems with FirePHP being instantiated so late in the game? I'd tried a similar approach and had some issues, that's why I instantiate in wp-config. – Stephen Nov 5 '12 at 14:54
@Stephen, nope, don't remember having any issues. I mainly debug plugins, sometimes themes and rarely the core or in-depth features. – brasofilo Nov 5 '12 at 15:36

I've had rotten luck and performance with the different FirePHP pluings except for the 'Yet Another Logger' one, but have to admit I didn't look at this one. Eventually I simply setup PEAR on my dev boxes and installed FirePHP.

 * FirePHP simple examples

// For FirePHP Object Oriented API
$firephp = FirePHP::getInstance(true);


// Procedureal API

The above code is from the wp-config.php file of one of my development sites. It shows the two different methods of invoking FirePHP. Remember use one or the other, not both.

You call FirePHP by different methods depending upon how you invoke it.

For the Object Oriented API:

global $firephp;
$firephp->log( $var, "Label" );

For the Procedural API:

FB::log( $var, "Label" );

So after a slightly off topic answer:

Double check the documentation for the plugin and make sure you're not supposed to be using the procedural API style call. A procedural call will not work with the object oriented API and vice versa.

Another option would be to try the 'Yet Another Logger' plugin.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.