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 468 feed subscribers
Follow me on Twitter 858 followers
Our Products
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!
-
Recent Posts
Popular Posts
Topics
Audio Business Career Cocoa Code Data Debugging Demo Design Development Geocoding Google Graphics Interface iPad iPhone Lifestyle Links Location Loopy Loopy HD Mac Maps Marketing Networking PHP Scripts Security Shell Social Comment Software Talkie Talkie-for-Mac The Cartographer Travel Tutorial Twitter Update Web Webapps WordPress WordPress Plugins WordPress Themes Workflow XCode



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;
}
Related posts