Debug Add-On - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Debug Add-On (/showthread.php?tid=16362) |
Debug Add-On - El Forum - 03-04-2009 [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: Debug Add-On - El Forum - 03-04-2009 [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(). Debug Add-On - El Forum - 03-04-2009 [eluser]opel[/eluser] there is a profiler in output class add this to controller $this->output->enable_profiler(TRUE); Debug Add-On - El Forum - 03-04-2009 [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! Debug Add-On - El Forum - 03-09-2009 [eluser]shay![/eluser] I made that debug add-on: http://rapidshare.com/files/207203316/debug.php.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! Debug Add-On - El Forum - 03-09-2009 [eluser]shay![/eluser] Usage is: $this->debug->dump($var, $tag, $die); You can create your own alias if you want! Debug Add-On - El Forum - 03-09-2009 [eluser]TheFuzzy0ne[/eluser] Thanks for sharing. I'm sure it will be very useful. |