Reputation: 39
I am setting $debug
to true
in app.php, but nothing changes.
How can I enable debug mode in CakePHP?
Upvotes: 3
Views: 8217
Reputation: 51
According to the cookbook, you can enable or disable the debug mode by changing the value of the "debug" parameter in the config/app.php file.
/**
* Debug Level:
*
* Production Mode:
* false: No error messages, errors, or warnings shown.
*
* Development Mode:
* true: Errors and warnings shown.
*/
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
And in your controller, you can do logging using the log() method (avalaible for all objects) :
$this->log('debug message','debug');
Upvotes: 2