Debug toolbar on production |
Is there any possibility to enable debug toolbar on production for some user privillege or in specific controller ?
in CI3 it was quite easy to enable it by for example in this way if($user[['role]=='admin') $this->output->enable_profiler(true) is something similar possible in CI4 ?
12-24-2021, 03:25 AM
(This post was last modified: 12-24-2021, 03:26 AM by captain-sensible. Edit Reason: spelling mistakes )
good question so that general users can't see output , but admin you can ?
The way I enable or disable debug is via index.php at public like so : Code: $_SERVER['CI_ENVIRONMENT'] = 'development'; generally I do all my testing on local , so that basically to all intents and purposes live is a clone of whats on local. However I have done some live editing of code , (big mistake ) which went pear shape. I fixed it by editing live the index.php to have the line quoted above as "development" . It gave me output from live, with the clue how to fix it. index.php and .env pretty global so i can't think how you would do that. (12-23-2021, 01:47 AM)Vodecki Wrote: Is there any possibility to enable debug toolbar on production for some user privillege or in specific controller ? No. CI4 uses the constant to enable debug toolbar. As you know constants cannot change on the runtime. |
Welcome Guest, Not a member yet? Register Sign In |