</> Code The Pixel

CakePHP 4 Force DebugKit in Live Server

Asyraf Wahi Anuar - November 29, 2021

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)

Popular
CakePHP 4 Print PDF Using CakePDF
May, 17 2020
CakePHP 4 Authentication Using Auth...
May, 14 2020
CakePHP 4 jQuery Date Time Picker
October, 01 2018
CakePHP 4 Export To CSV
May, 29 2020
CakePHP 4 Authentication Using...
May, 11 2020
CakePHP 4 File Upload Using Proffer Plugin
May, 15 2020
CakePHP 4 Find, Sort & Count
June, 02 2020
Share
Sharing Link
Click the icon to share