About This
I am Michael Tyson, and I run A Tasty Pixel. I write on a variety of technology and software development topics as I travel around Europe in a motorhome.
-
Subscribe to updates 203 feed subscribers
Follow me on Twitter 367 followers
Newsletter
Let us keep you informed about important updates, special offers, and new products. Just type in your email address below and hit enter to sign up!
My Products
Popular Posts
- "Elegant Grunge" Wordpress theme
- Using RemoteIO audio unit
- Custom Permalinks
- Connecting an iMac up to your TV
- Smart 404 for Wordpress
- UIImage, resolution independence and the iPhone 4's Retina display
- Flickrpress: Wordpress Flickr widget
- Easy rounded corners on UITableViewCell image view
- Making UIToolbar and UINavigationBar's background totally transparent
- Sort your Flickr photostream
PHP debugging
A better solution is to redirect all of that output into an external file, and use a tool like tail to monitor the log.
For printing debug statements, a debug function that shows where each statement came from (file and line number), and is capable of printing complex objects is useful too.
The following is the debugging code that’s included in SiteComponents.
if ( defined("DEBUG_ENABLED") ) { ini_set("error_log", $_SERVER["DOCUMENT_ROOT"]."/debug.log"); ini_set("error_reporting", E_ALL); ini_set("display_errors", false); ini_set("log_errors", true); }/** * Define debugging routine */ function SCDEBUG($content="") { if ( !defined("DEBUG_ENABLED") ) return;
}