I want to be able to set debug level for one session. That is, click somewhere in an admin page and store the new debug level so that core.php reads that and sets the debug level from that varialbe or sets itself to the default value.
It seems the session component is not ready at the time core.php sets the debug level.
How may I do this, maybe in some other way?
Do I really have to set up a DB table???
I tried this:
if(isset($_SESSION['debug'])) {
Configure::write('debug', $_SESSION['debug']);
}
but it doesn’t work,
Thanks!
I use this in my
bootstrap.phponly on my dev server (just to get rid of DebugKit and other debug stuff to see what the page looks like without them and page speed):Which I know works. So you can adapt that to what you have, but try it in
bootstrap.php: