using firephp to debug mate

A collection of tutorials and posts that show additional functionality of MATE

Moderator: KarelB

using firephp to debug mate

Postby edwardsmarkf » Thu Jun 07, 2012 4:13 pm

hello all -

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.
edwardsmarkf
 
Posts: 54
Joined: Fri Jun 10, 2011 11:03 pm

Return to How To

Who is online

Users browsing this forum: No registered users and 1 guest

cron