Code The Pixel

CakePHP 4 Force DebugKit in Live Server

Asyraf Wahi Anuar - November 29, 2021
Published in CakePHP 1151 Views Email This Article
Estimated reading time: 41 seconds

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 :)


Cite this article (APA 6th Edition)