Closed escopecz closed 10 years ago
First, the debug option in the 0.8.0 release was a bug. We accidentally set the mode in such a way that it could not be changed by the configuration setting. In the Development branch the debugger is set initially to the PRODUCTION mode and then toggled to whatever you have configured in the new Debugger class:
https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Debugger.php
This means that your system setting will actually work now. In the meantime you can manually edit the index.php and change DEVELOPMENT to PRODUCTION.
Regarding the update, yes development branch has MANY new additions and we hope to release a 0.9.0 version on monday. I just need to work on the documentation updates required and some information explaining how this may effect current users. Content is not effected, it's mostly in plugins and themes (need to change asset handling).
Thanks rhukster. Great answer. Looking forward to new version.
I'd add DETECT mode anyway. You see, file based CMS has great advantage that I can use GIT for my content (/user/ folder) and set up post-receive hook to deploy new code to production server. I did that yesterday actually. I'll write an article about it to my new Grav blog. That is main reason why I have chosen Grav in the first place. When I set it up this way, config files will update as well. That's why I need DETECT mode so it will set debug mode automatically.
It requires to add new property to Debugger.php:
const DETECT = TracyDebugger::DETECT;
and turn this mode up if debug option at config file is for example null or empty. Do you think this could appear in future version?
I've just pushed a commit to use DETECT by default, but you can override if required in the configuration. Should be out in 0.9.0 shortly.
Wow, awesome! Thanks!
Should be sorted with 0.9.0 release
Hi,
I'd like to get rid of Tracy bar at production. But it is hard-coded at index.php that debugger is in development mode regardless the configuration:
https://github.com/getgrav/grav/blob/master/index.php
I can see that at develop branch it is hard-coded the opposite way:
https://github.com/getgrav/grav/blob/develop/index.php
I'd suggest to use
This will use development mode on localhost and production mode on public IP. That is what all of us need, isn't it? More info: https://github.com/nette/tracy#production-mode-and-error-logging
I wanted to implement it and make a pull request, but I can't make develop branch working on my localhost. It seems to have missing few classes. That's why I rather write this issue.
Questions: