lpa Posted October 26, 2013 Posted October 26, 2013 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?
adrian Posted October 27, 2013 Posted October 27, 2013 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");
lpa Posted October 27, 2013 Author Posted October 27, 2013 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?
ryan Posted November 2, 2013 Posted November 2, 2013 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.
lpa Posted November 2, 2013 Author Posted November 2, 2013 Ok, thanks! I just thought I had seen the debug info on front-end too, but obviously not.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now