Debugging Class in creation of a Framework
View Single Post
04-15-2009, 02:07 AM
Join Date: Sep 2007
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
The Following User Says Thank You to Kalle For This Useful Post:
View Public Profile
Send a private message to Kalle
Visit Kalle's homepage!
Find More Posts by Kalle