Monthly Archive: October 2010
October 28, 2010

I have finished and released updates to the FirePHP Firefox Extension, FirePHPCore Server Library and Zend Framework implementation. The updates include various bug fixes and new features.

Continue reading »

October 15, 2010

FirePHP is most often used for ad hock logging of variables during development by placing logging calls at strategic places in your code.

$someVariable = 'Some value';
 
// using FirePHPCore
$firephp = FirePHP::getInstance(true);
$firephp->log($someVariable);
 
// using Zend_Log_Writer_Firebug
$logger = new Zend_Log(new Zend_Log_Writer_Firebug());
$logger->log($someVariable, Zend_Log::DEBUG);

This works well for variables that contain small amounts of data. String, boolean and integer values are typically small and do not require much consideration. Array and object values may contain a lot more data as FirePHP traverses them (all array elements and object members) until the complete or maximum depth is reached. This is also true when logging exceptions and traces where all function and method arguments are also traversed. The data volume can quickly grow to megabytes which has fatal consequences for transmission of the debug data to the client and the client being able to render it.

FirePHP includes some solutions to these problem that you can take advantage of.

Continue reading »