Advanced Debugging in Cakephp

By this article you must have knowledge on basic debugging in cakephp.

This article is based on some advanced level of debugging concept in cakephp.

STEP-1 (Download kit and Put in cakephp directory)

To continue with this please download the KIT from the below URL.

After download deCompress it. Then you will find a folder called “debug_kit-master”, just you need to rename it to “DebugKit”.

Next copy this folder to you cakephp installisation folder , below path


so after copy paste the path should look like this


STEP-2 (Tell the cakephp to load it during startup)

Goto app/config/bootstrap.php

write the following code , any where of your choice, but inside bootstrap.php file


Now Goto app/controller/AppController.php
write following code, in the before $component variable of your AppController.php file

public $components = array('DebugKit.Toolbar');

Now goto your application you can see a cakephp logo to the extreme right top corner, just click on that. Rest thing you will love it.

Debug screen cakephp @way2code






Why you need this ?

Imagine you are in a situation where, heavy hit of your application is going on in production server. you cann’t stop the production server but still you want to print some variable or you may want to trace a bug by debugging some part of the code. In the mean time you donn’t want to show any thing to any of the users, that you are debugging something, in that case you may debug entire thing by clicking of this tiny logo.

EvenĀ  in this debug kit, there is one provision where the KIT will allow the logo to visible by some special parameter passing in URL, so that ultimately allows us to restrict normal user to view that logo.

This has provision to make your own debug panel, where you can debug variable and pass that variable to your own Debug panel.

Keep Debugging.