php - How to catch errors/warnings with FirePHP -



php - How to catch errors/warnings with FirePHP -

i'm not sure how firephp grab errors , warnings , study them in firebug console.

i've installed firephp , i'm pretty sure working—i see responses these in console:

fb('log message', firephp::log); fb('info message', firephp::info); fb('warn message', firephp::warn); fb('error message', firephp::error);

i see "log message," "info message", "warn message" , "error message." changed code intentionally break it--it gave me logs:

[21-jan-2013 22:19:49] php warning: missing argument 3 echo_first_image(), called in /app/web/xxx/wp-content/themes/xxx/home.php on line 85 , defined in /app/web/xxx/wp-content/themes/xxx/functions.php on line 12

i'm trying grab , print in firephp not beingness detected, , i'm not sure why. total code block initializing firephp:

<?php /* debug */ require_once("debug/firephp.class.php"); require_once('debug/fb.php'); $firephp = firephp::getinstance(true); ob_start(); fb('log message', firephp::log); fb('info message', firephp::info); fb('warn message', firephp::warn); fb('error message', firephp::error); ?>

an explanation or resource helpful. thanks!

to need convert errors exceptions.

from firephp website:

error, exception & assertion handling

convert e_warning, e_notice, e_user_error, e_user_warning, e_user_notice , e_recoverable_error errors errorexceptions , send exceptions firebug automatically if desired.

assertion errors can converted exceptions , thrown if desired.

you can manually send caught exceptions firebug.

$firephp->registererrorhandler( $throwerrorexceptions=false); $firephp->registerexceptionhandler(); $firephp->registerassertionhandler( $convertassertionerrorstoexceptions=true, $throwassertionexceptions=false); seek { throw new exception('test exception'); } catch(exception $e) { $firephp->error($e); // or fb:: }

php debugging firephp

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -