Debug Add-On |
[eluser]shay![/eluser]
Hi everyone, Does anyone know of a Debug class/add-on for dumping variables for CodeIgniter? Zend Framework has a similar functionality with Zend_Debug. (http://framework.zend.com/manual/en/zend.debug.html) I could write my own but I'd rather use one everyone else is using! Cheers! Shay :lol:
[eluser]TheFuzzy0ne[/eluser]
I'm sure such a thing exists, but I usually just add a [url="http://uk2.php.net/oop5.magic"]__toString()[/url] method, and either echo that, or pass it to log_message().
[eluser]opel[/eluser]
there is a profiler in output class add this to controller $this->output->enable_profiler(TRUE);
[eluser]shay![/eluser]
TheFuzzy0ne, Opel. Thank you for your reply. $this->output->enable_profiler(TRUE) is very useful thank you. I think I'll write my own add-on that will enable me to write $this->showvars($var, 'some flag'); to produce debug information on a specific variable at a specific point in the code. I'll upload it when I'm done with it! Thanks guys!
[eluser]shay![/eluser]
I made that debug add-on: http://rapidshare.com/files/207203316/de...p.zip.html MD5: 4F432E368B847F8AED03557198CAC718 Put it in your autoloader / $this->load and you'll be able to spit out messages similar to the profiler at will!
[eluser]shay![/eluser]
Usage is: $this->debug->dump($var, $tag, $die); You can create your own alias if you want!
[eluser]TheFuzzy0ne[/eluser]
Thanks for sharing. I'm sure it will be very useful. |
Welcome Guest, Not a member yet? Register Sign In |