How to change your DEBUG level on the fly
14
Oct
2007
The debugging features of cakePhp is very very helpful to me specially the full debug with sql. Sometimes it's a bit irritating if your dealing with ajax calls. In looking at the cheesecake source code, I found this hack to change it to 0, 1, 2 or 3 on the fly:
PHP:
-
Configure::write('debug',0);
Here is the complete code on how they handle ajax calls:
PHP:
-
// Hack to prevent wierd output with AJAX
-
if ($this->RequestHandler->isAjax()) {
-
$db =& ConnectionManager::getDataSource('default');
-
$db->fullDebug = false;
-
-
}





