= sfEasyDebug Plugin =
== Overview ==
sfEasyDebugPlugin provides tools to ease the debugging.
== Graceful Degradation of Firebug ==
Willing to use firebug features on IE or Safari ? Already suffered hours of js debugging
to find out you forgot a single [http://getfirebug.com/console.html console] API call.
Then this plugin is for you !
If firebug extension is not present in the browser, it allows to automatically
include firebug-lite to have a cross-browser version of firebug, or firebugx which convert any
[http://getfirebug.com/console.html console] API call to a no-operation. This avoid to have
all your javascript to fails, just because you forgot a single [http://getfirebug.com/console.html console]
call. To benefit from this feature, one must add the following at the end of the layout.php:
{{{
}}}
== Installation ==
To install sfEasyDebugPlugin:
{{{
./symfony plugin-install symfony/sfEasyDebugPlugin
}}}
To install from svn:
{{{
svn co http://svn.symfony-project.com/plugins/sfEasyDebugPlugin plugins/sfEasyDebugPlugin
}}}
Clear your cache
{{{
./symfony cc
}}}
== Usage ==
Currently it implements only one function '''ezDbg::err()'''
{{{
ezDbg::err($mixed)
}}}
If $mixed is a string, it is directly passed to the sfLogger->err() and to the firebug console.info().
If $mixed is anything else, it is pass to sfLogger->err() as a print_r($mixed, true), and to
the firebug console.dir().
As convenience mechanism, it is possible to pass multiple parameters e.g '''ezDbg::err(a,b,c)''', and they
will be treated as multiples call to '''ezDbg::err()'''
Additionnaly it add some information on the location of the ezDbg::err(), like the location file and
class.
In order to get the debug passed to firebug, one must add the following at the end of the layout.php
{{{
}}}
Alternativly if you want to pass the debug to firebug, only if you are in '''dev''' environnement:
{{{
}}}
To dump the backtrace on the same logs as ezDbg::err(), do
{{{
ezDbg::dump_backtrace();
}}}
== TODO ==
* Improve support of firebug API
* Make the logging configurable
== License ==
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.