i found this pretty handy when it came to trying to debug a mate script (or any other php program for that matter)
1 - download and install the firephp libraries from http://www.firephp.org/
2 - in firefox, install firebug and firephp
3 - add this near the top of your script:
- Code: Select all
require_once('/usr/lib/php/FirePHPCore-0.3.2/lib/FirePHPCore/FirePHP.class.php');
require_once('/usr/lib/php/FirePHPCore-0.3.2/lib/FirePHPCore/fb.php');
ob_start();
$firephp = FirePHP::getInstance(true); //non-global
$GLOBALS['firephp'] = FirePHP::getInstance(true);
anywhere in the program you can include these calls:
- Code: Select all
$GLOBALS['firephp']->log($var, 'Iterators');
$GLOBALS['firephp']->log($_GET);
the values are logged into the firebug console. i have not gotten this working on google-chrome yet.