Jump to content

Recommended Posts

Posted

I have $config->debug = true. I get the debug information on the backend but not on the front-end. I am using the Foundation profile from Ryan. What might be wrong?

Posted

Try this code somewhere in one of the files that are included on every page:

if($config->debug && $this->user->isSuperuser()) include($config->paths->adminTemplates . "debug.inc");
Posted

Thanks Adrian, that works. I thought it would come automatically on the front-end too when I define $config->debug = true;

But if I want the output on front-end to be as pretty collapsed or formatted as it is on back-end, what should I do? Do I need to define css and js for debugging myself? If so, what is enough? 

Posted

Debug mode means that PHP is reporting specific error messages. It's something you want when developing a site, but not once a site is on a production server. The debug information that you see in the admin is primarily for development of ProcessWire and modules. It would be possible for you to output something like that on the front-end too, but since ProcessWire isn't generating the markup for your site, it's up to you to decide what/how you want to handle additional output in debug mode. That's a good idea by Adrian to just include the admin version of it, if it suits your need... I'm guessing it's not pretty unless you are using jQuery UI on your front-end, but if it works, it seems fine to do it.

Posted

Ok, thanks! I just thought I had seen the debug info on front-end too, but obviously not.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...