CakePHP 4 Force DebugKit in Live Server
DebugKit adds a debugging toolbar and better-debugging capabilities to CakePHP apps. It allows you to rapidly see configuration data, log messages, SQL queries, and timing statistics for your application.
This tutorial may be outdated
It was last reviewed 4 years ago. Some steps may differ in newer versions.
Tech stack
- CakePHP 4.x
DebugKit adds a debugging toolbar and better-debugging capabilities to CakePHP apps. It allows you to rapidly see configuration data, log messages, SQL queries, and timing statistics for your application. DebugKit is solely designed for usage in single-user local development settings. You should avoid using DebugKit in shared development environments, staging environments, or any other environment where configuration data and environment variables must be kept concealed. DebugKit is deployed with the default application skeleton by default.
Once you upload the web application to the live server, it is recommended to disable the DebugKit. Technically, CakePHP will block the DebugKit from rendering in the live server. If you need to force the DebugKit to show in the live server environment, you can add the following code at the end of bootstrap.php:
Configure::write('DebugKit.forceEnable', true);That's all. Happy debugging :)
Did this tutorial help?
229 readers found this helpful
Comments
No comments yet. Questions about this tutorial are welcome here: the answer helps the next reader too.