Introducing Fire Profiler

Difficulty: Medium

Anyone using Firefox and developing stuff for the web should know about Firebug. It’s an excellent tool for web development helping you with ajax, js, css, and what not. Today I read about FirePHP on Webmonkey. FirePHP is a plugin for Firebug and can help you with PHP debugging. I never paid much attention to it though, till today.

Anyway, today I did start using FirePHP and it’s quite neat. I had some spare time and worked Kohana’s profiler into FireProfiler. Despite the crappy name, it works well. It is the same as the normal profiler in Kohana, only the output is sent to FireBug where it’s formatted nicely and shown to you in a table. You can also use FirePHP’s other features.

Before using this profiler you first need to install Firebug and FirePHP. You install Fire Profiler by moving the Fire_Profiler file to your ‘libraries’ directory. Also, download the PHP library from the FirePHP site, move the FirePHP.class.php from the archive to your ‘libraries’ directory and rename it from FirePHP.class.php to FirePHP.php. Now you’re done.

First the Fire Profiler functionality. Do the following in the file you want to profile:

$firephp=new Fire_Profiler;

That’s it, you’ll see something like this in your FireBug console Nice :)

Of course the normal FireBug behaviour is preserved:

$firephp=new Fire_Profiler;
$firephp->dump($_SERVER, 'Server Variables');
$firephp->log($_SESSION, '$_SESSION',FirePHP::LOG);
$firephp->fb('Info message' ,FirePHP::INFO);
$firephp->fb('Warn message' ,FirePHP::WARN);
$firephp->fb('Error message',FirePHP::ERROR);

Will render:

I hope some might find it useful. Don’t forget to remove the profiler when in production since everyone with FirePHP will see the stuff.

viagra
free viagra
buy viagra online
generic viagra
how does viagra work
cheap viagra
buy viagra
buy viagra online inurl
viagra 6 free samples
viagra online
viagra for women
viagra side effects
female viagra
natural viagra
online viagra
cheapest viagra prices
herbal viagra
alternative to viagra
buy generic viagra
purchase viagra online
free viagra without prescription
viagra attorneys
free viagra samples before buying
buy generic viagra cheap
viagra uk
generic viagra online
try viagra for free
generic viagra from india
fda approves viagra
free viagra sample
what is better viagra or levitra
discount generic viagra online
viagra cialis levitra
viagra dosage
viagra cheap
viagra on line
best price for viagra
free sample pack of viagra
viagra generic
viagra without prescription
discount viagra
gay viagra
mail order viagra
viagra inurl
generic viagra online paypal
generic viagra overnight
generic viagra online pharmacy
generic viagra uk
buy cheap viagra online uk
suppliers of viagra
how long does viagra last
viagra sex
generic viagra soft tabs
generic viagra 100mg
buy viagra onli
generic viagra online without prescription
viagra energy drink
cheapest uk supplier viagra
viagra cialis
generic viagra safe
viagra professional
viagra sales
viagra free trial pack
viagra lawyers
over the counter viagra
best price for generic viagra
viagra jokes
buying viagra
viagra samples
viagra sample
cialis
generic cialis
cheapest cialis
buy cialis online
buying generic cialis
cialis for order
what are the side effects of cialis
buy generic cialis
what is the generic name for cialis
cheap cialis
cialis online
buy cialis
cialis side effects
how long does cialis last
cialis forum
cialis lawyer ohio
cialis attorneys
cialis attorney columbus
cialis injury lawyer ohio
cialis injury attorney ohio
cialis injury lawyer columbus
prices cialis
cialis lawyers
viagra cialis levitra
cialis lawyer columbus
online generic cialis
daily cialis
cialis injury attorney columbus
cialis attorney ohio
cialis cost
cialis professional
cialis super active
how does cialis work
what does cialis look like
cialis drug
viagra cialis
cialis to buy new zealand
cialis without prescription
free cialis
cialis soft tabs
discount cialis
cialis generic
generic cialis from india
cheap cialis sale online
cialis daily
cialis reviews
cialis generico
how can i take cialis
cheap cialis si
cialis vs viagra
levitra
generic levitra
levitra attorneys
what is better viagra or levitra
viagra cialis levitra
levitra side effects
buy levitra
levitra online
levitra dangers
how does levitra work
levitra lawyers
what is the difference between levitra and viagra
levitra versus viagra
which works better viagra or levitra
buy levitra and overnight shipping
levitra vs viagra
canidan pharmacies levitra
how long does levitra last
viagra cialis levitra
levitra acheter
comprare levitra
levitra ohne rezept
levitra 20mg
levitra senza ricetta
cheapest generic levitra
levitra compra
cheap levitra
levitra overnight
levitra generika
levitra kaufen


5 Responses to “Introducing Fire Profiler”

  1. Zoxive Says:

    Thanks for posting this, it looks very useful, and I am in the process of trying it out right now.

  2. Matt Says:

    Nice find Dlib! Thanks

  3. bennythemink Says:

    Thanks dlib! its very handy. nice post.

  4. Rastatech Says:

    Hey I just got around to trying this out, and I thought I’d point out some gotchas for anyone who tries this after me.
    First off, the code examples of
    $firephp->dump($_SERVER, ‘Server Variables’);
    etc won’t work out of the box given the above instructions and the code on
    http://code.google.com/p/kohana-mptt/source/browse/trunk/Fire_Profiler.php
    Fire_Profiler is not extending FirePHP, so you need to change the Fire_Profiler firephp private attribute to public and call the FirePHP methods via $firephp->firephp->dump (works, tried) or possibly extend the FirePHP class directly? (not tried)

  5. Rastatech Says:

    or of course, make $firephp = new FirePHP :)
    Again, nice work on this, dlib, thanks!

Leave a Comment