To enable debug mode in CakePHP go to config folder and open app.php
find ‘debug’ => filter_var(env(‘DEBUG’, false), FILTER_VALIDATE_BOOLEAN), and change the value of debug false to true
Older CakePHP versions
To enable debug mode in older versions of CakePHP go to Config folder and open core.php
find Configure::write(‘debug’, 0); and change the value of debug to 1 or 2
- 0: No error messages, errors, or warnings shown. Flash messages redirect.
- 1: Errors and warnings shown, model caches refreshed, flash messages halted.
- 2: As in 1, but also with full debug messages and SQL output.
then visit the website and the error will be displayed:
To disable debug log simply change the number back to 0.