barbushin / php-console

Handle PHP errors, dump variables, execute PHP code remotely in Google Chrome
https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef
MIT License
1.34k stars 283 forks source link

Option to disable output via server side config #163

Open userlond opened 4 years ago

userlond commented 4 years ago

Is there any option to disable/enable php-console functionality during its inititalisation via server code?

For example. I have some constant, let's call it DEBUG. If DEBUG is set to false, I want to completele mute the extension, as it isn't used on server at all.

The first solution is to make initialisation block conditional, i.e. wrap it into something like if (DEBUG) { // init php-console}, but this way any call to PhpConsole in my code will raise an error...