1. Go to this page and download the library: Download wizdam/debug-toolbar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wizdam / debug-toolbar example snippets
use DebugToolbar\DebugToolbar;
$config = olbar->run();
define('WIZDAM_DEBUG', true); // Aktifkan hanya di development!
$middleware = new \DebugToolbar\Middleware\DebugToolbarMiddleware($toolbar);
$middleware->startBuffer();
// ... logika aplikasi Anda berjalan normal ...
$middleware->endBuffer(); // Toolbar otomatis di-inject di akhir HTML
use DebugToolbar\Adapters\AdodbDatabaseAdapter;
use DebugToolbar\Collectors\DatabaseCollector;
$dbAdapter = new AdodbDatabaseAdapter();
$toolbar->addCollector(new DatabaseCollector($dbAdapter));
use DebugToolbar\Interfaces\CollectorInterface;
class CacheCollector implements CollectorInterface
{
public function getData(): array { /* ... */ }
public function isEnabled(): bool { /* ... */ }
public function getBadgeValue(): string|int|null { /* ... */ }
public function getIcon(): string { /* ... */ }
}
$config['collectors'][] = CacheCollector::class;
$toolbar = new DebugToolbar($config);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.