2

After install CakePHP3 ver. 3.6.2, debug_kit don't show panel. in the log file "Warning: DebugKit is disabling itself as your host newtest.my is not in the known safe list of top-level-domains (localhost,dev,invalid,test,example,local). If you would like to force DebugKit on use the DebugKit.forceEnable Configure option."

How i can enable debug panel? Thank's!

2 Answers2

8

This question has already been answered by Greg Schmidt but for clarity for anyone else wondering about this in the future: basically what is happening is CakePHP has determined that the host you are using is unsafe, and has therefore disabled the Debug Kit. CakePHP also provides a workaround for this by providing the DebugKit.forceEnable key to override this default behavior. It is recommended that you do this in either app.php or, if you have kept the default app.php as-is and provided an override file like app_local.php as you should, you can do it there as well:

'DebugKit' => [
    'forceEnable' => true,
    // other config options
]

CakePHP provides a tiny explanation of this in Their Cookbook

Derek Fulginiti
  • 333
  • 1
  • 9
2

An other way to achieve this would be to do something like this in your bootstrap.php

if (Configure::read('debug')) {
    Configure::write('DebugKit.forceEnable', TRUE);
    Plugin::load('DebugKit', ['bootstrap' => TRUE]);
}
thanassis
  • 691
  • 5
  • 11