Download this library, extract and rename this folder to ci4-debug-toolbar.
Enable it by editing app/Config/Autoload.php and adding the Nfaiz\DebugToolbar namespace to the $psr4 array.
See namespace for more information.
E.g Using app/ThirdParty directory path:
$psr4 = [
APP_NAMESPACE => APPPATH, // For custom app namespace
'Config' => APPPATH . 'Config',
'Nfaiz\DebugToolbar' => APPPATH . 'ThirdParty\ci4-debug-toolbar\src',
];
Install package via composer:
composer require scrivo/highlight.php:^v9.18
In app/Config directory edit
app/Config/Events.php
From
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
To
// Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
Events::on('DBQuery', 'Nfaiz\DebugToolbar\Collectors\Database::collect');
app/Config/Toolbar.php
From
use CodeIgniter\Debug\Toolbar\Collectors\Database;
To
// use CodeIgniter\Debug\Toolbar\Collectors\Database;
use Nfaiz\DebugToolbar\Collectors\Database;
public $maxQueries = 100;
/**
* -------------------------------------------------------------
* SQL CSS Theme
* -------------------------------------------------------------
*
* Configuration for light and dark mode SQL syntax highlighter.
*
* @var array
*/
public $sqlCssTheme = [
'light' => 'default',
'dark' => 'dark'
];