Skip to content
CODE THE PIXEL
CakePHP

CakePHP 4 Force DebugKit in Live Server

Asyraf Wahi Anuar 1 min read

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:

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.

Leave a comment

Markdown works: `code`, ``` blocks, **bold**, links.

First comments are reviewed before they appear.

CakePHP

Using Bahasa Melayu Table Names in CakePHP

Learn how to use Bahasa Melayu table names like "pengguna" in CakePHP while following the framework’s naming conventions. Includes tips for using the Bake tool and avoiding pluralization issues.

5 min read

Tools & Software

Formatting PHP in VSCode Using Prettier and PHP Intelephense

Learn how to set up Visual Studio Code (VSCode) for automatic PHP file formatting using the Prettier and PHP Intelephense extensions. This step-by-step tutorial will help you maintain a clean and organised codebase, enhancing your PHP development experience.

2 min read