. . Home | About | Projects

Using FirePHP with Magento

Posted on 05 Aug 2009

The good example of FirePHP usage in Magento has been introduced by ActiveCodeline in his post Utilize FireBug (and FirePHP) to speed up Magento development early this year. Here I would like to show you another place you can utilize that function in :)

UPDATE: the FirePHP wrapper class now available as a magento extension though tinycarts channel, simply proceed with the following commands under the top directory of your magento instance:

  • ./pear channel-discover tinycarts.github.com
  • ./pear install tinycarts/Lib_Tinycarts_Debug

And skip to usage example.

FirePhp wrapper

Create Firephp.php file in lib/Tinycarts/Debug, or checkout(or download) it from github TinycartsLibs.

The static send() method it’s exact copy of acl() function introduced by ActiveCodeline.

Usage

Go into one of your template files like /catalog/product/view.phtml and call this function like:

NOTE: to let it send debug messages you have to uncomment Mage::setIsDeveloperMode(true); in your index.php in development environment ONLY!!!. Next time I’ll tell you how to split environment and do not bother index.php at all ;)

UPDATE: sinse 1.4 release developer mode can be enabled by defining special environment variable MAGE_IS_DEVELOPER_MODE at your development machine, see configure_magento_error_page.