# 如何關閉Debug欄
在 `Config/App.php` 中的地277行左右:有這么一段:
```php
/*
|--------------------------------------------------------------------------
| Debug Toolbar
|--------------------------------------------------------------------------
| The Debug Toolbar provides a way to see information about the performance
| and state of your application during that page display. By default it will
| NOT be displayed under production environments, and will only display if
| CI_DEBUG is true, since if it's not, there's not much to display anyway.
*/
public $toolbarCollectors = [
'CodeIgniter\Debug\Toolbar\Collectors\Timers',
'CodeIgniter\Debug\Toolbar\Collectors\Database',
'CodeIgniter\Debug\Toolbar\Collectors\Logs',
'CodeIgniter\Debug\Toolbar\Collectors\Views',
// 'CodeIgniter\Debug\Toolbar\Collectors\Cache',
'CodeIgniter\Debug\Toolbar\Collectors\Files',
'CodeIgniter\Debug\Toolbar\Collectors\Routes',
'CodeIgniter\Debug\Toolbar\Collectors\Events',
];
```
從注釋中可以看到,這是 `CI_DEBUG` 在控制著,它在什么地方呢?通過Sublime Text搜索得知,在幾個控制版本的文件中,下方表示文件、行數、代碼:
```text
E:\xampp\htdocs\application\Config\Boot\development.php:
31 */
32
33: define('CI_DEBUG', 1);
34
E:\xampp\htdocs\application\Config\Boot\production.php:
20 */
21
22: define('CI_DEBUG', 0);
23
E:\xampp\htdocs\application\Config\Boot\testing.php:
31 */
32
33: define('CI_DEBUG', 1);
34
```
如果直接將環境改為`production`,那就自然沒有了,但像我這種,既想保持`development`又不想關閉`Debug Toolbar`的,就可以在`development.php`中將參數設置為`0`
(完)