CodeIgniter 4 - turn off display of debugger toolbar - without changing CI_ENVIRONMENT

Viewed 15

CodeIgniter 4 - how to turn off display of debugger toolbar - without changing CI_ENVIRONMENT?

Changing environment variable CI_ENVIRONMENT to production will turn off the debug toolbar - but will also suppress errors. I want to still see errors - but I do not want to see the debug toolbar at the bottom of all of my views when in 'development' mode.

2 Answers

Setting CI_DEBUG to 'false' - in \app\Config\Boot\development.php - will hide the 'KINT' toolbar; but allow CodeIgniter's error display to continue.

defined('CI_DEBUG') || define('CI_DEBUG', false);

https://codeigniter4.github.io/CodeIgniter4/testing/debugging.html "the excellent Kint debugging tool for PHP. It will be enabled whenever the constant CI_DEBUG is defined and its value is truthy. This is defined in the boot files (e.g. app/Config/Boot/development.php)."

Related