04-15-2009, 02:07 AM
|
#11 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
|
I would rather use a set of procedural functions for debugging than a class, instead of making a class where almost all methods are better served static (from my point of view).
All you need is a set of functions thats usable for debugging, and only included when debug mode is triggered (if your system ofcourse have a debugging mode).
Example of functions can be: - Backtracing in a nice manner thats more detailed that the regular debug_print_backtrace() output
- Functions for catching and displaying exceptions and errors in somewhat unified interface, combining this with the backtrace is a good idea, as it can show if anywhere in the backtrace something occured
- Assertions, http://www.php.net/assert
__________________
|
|
|