0

I want to use DebugKit, but my problem is the next: I designed a login page for the project. And on my routes.php I defined it as my index page, in this way:

Router::connect('/', array('controller' => 'users', 'action' => 'login')); 

I use

 public function login() {
    $this->layout = false;
}

on my UsersControllers, to don't use the default layout of the entire project. But the DebugKit toolbar is not showing. Also I tryed with

$this->autoRender= false;

but it was worst. The DebugKit is showing in the default page of the project (when it was created with NetBeans) Any ideas to get visible the DebugKit? Or a better way to debug a project in CakePHP?

eduardo a
  • 152
  • 4
  • 17
  • Have you viewed the source to verify it's actually not being written to the page? My guess is your CSS or JS or something is making the DebugKit box hidden or behind something. Setting layout to false is the right way to do it (assuming you don't want to use a layout), and should cause no problems with DebugKit. – Dave Apr 14 '15 at 15:19
  • Did you mean that if I look at the source code with Develop Tools of Chrome or Firebug? Because there isn't any code about DebugKit. Did I should to post the CSS code that I'm using? – eduardo a Apr 14 '15 at 16:38
  • The only reason DebugKit shouldn't be on that page (if it is on others) is i you're lowering the debug level for it specifically. – Dave Apr 14 '15 at 16:49

1 Answers1

0

Using $this->layout = false will disable all html output from the default.ctp file. No CSS , meta tags javascript etc....

try adding the below to the html page you are rendering

echo $this->fetch('css'); echo $this->fetch('script');

If you want to modify the debug level you can set it statically in any view, or in the core.php file

Configuration::write('debug', 2);

will set the debug output to 2 and will enable all output debugging

Colonel Mustard
  • 1,482
  • 2
  • 17
  • 42