zen of coding

CakePHP 3 – DebugKit, where are you?

Debug Kit, one of the most awesome plugins for CakePHP, is now installed by default with the cake core.

However, I recently setup a brand new Cake 3 app, and DebugKit was nowhere to be seen in my app.

What gives?

Checking all the usual suspects, like making sure debug is true and the plugin is loaded in app/config/bootstrap.php

Plugin::load('DebugKit', ['bootstrap' => true]);

I resorted to checking out the CakePHP error log file (app/tmp/logs/error.log)… And lookly-look what we have there:

Warning: DebugKit not enabled. You need to either install pdo_sqlite, or define the "debug_kit" connection name.

Well, it just happens that not only my Cake install was fresh, but also my Ubuntu.

For me running:

sudo apt-get install php5-sqlite

.. fixed the problem.

But there are more stubborn cases and the solution for those is described here.

  • Mark

    The requirement should be in the readme:
    https://github.com/cakephp/debug_kit/tree/3.0#requirements

    Also, you can use DebugKit without sqlite if you want to:
    https://github.com/cakephp/debug_kit/tree/3.0#database-configuration

    • teknoid

      true, but do people (inducing myself read) :) ?

      p.s. i do prefer using sqlite, but the issue is not very obvious. until you find the error.

    • true, but do people (inducing myself read) :) ?

      p.s. i do prefer using sqlite, still the issue is not very obvious. until you find the error.

  • Thanks, exactly what I needed! Don’t forget to restart apache after installing php5-sqlite.

  • Xu Ding

    And remember to do bin/cake plugin assets symlink
    so you can load DebugKit assets correctly.

  • maiconjg

    muito obrigado amigo. me ajudou muito!!

%d bloggers like this: