- Integration of PHP Debug Bar
- Easy log messages
- Preview configuration, hooks called, files, page variables, requests & exceptions
- More soon 👀 ...
index.php
file at the root by this content:
<?php
define('KIRBY_HELPER_DUMP', false);
require __DIR__ . '/kirby/bootstrap.php';
echo (new Kirby)->render();
composer require treast/kirby-debugbar
git submodule add https://github.com/Treast/kirby-debugbar.git site/plugins/debugbar
Download this zip and unzip it in site/plugins/debugbar
.
Add this snippet at the bottom of your footer & enjoy !
<?= snippet('debugbar') ?>
$site->logger()->debug('This is a debug');
$site->logger()->emergency('This is an emergency');
$site->logger()->error('This is an error');
$site->logger()->critical('This is a critical');
$site->logger()->info('This is an info');
$site->logger()->warning('This is a warning');
$site->logger()->alert('This is an alert');
$site->logger()->notice('This is a notice');
$site->logger()->log('debug', 'This is also a debug');
// Or you can chain with the ->log() function
$site->log()->title()->log();
$page->children()->log()->first()->log();
Option name | Default | Type | Description |
---|---|---|---|
treast.debugbar.force |
false |
boolean |
If enabled, will display the debug bar even with debug === false |
treast.debugbar.tabs.logs |
true |
boolean |
Show logs tab |
treast.debugbar.tabs.config |
true |
boolean |
Show config tab |
treast.debugbar.tabs.events |
true |
boolean |
Show events tab |
treast.debugbar.tabs.files |
true |
boolean |
Show files tab |
treast.debugbar.tabs.variables |
true |
boolean |
Show variables tab |
treast.debugbar.tabs.request |
true |
boolean |
Show request tab |
treast.debugbar.tabs.exception |
true |
boolean |
Show exceptions tab |
<?php
return [
'treast.debugbar' => [
'force' => false,
'tabs' => [
'logs' => true,
'config' => true,
'events' => true,
'files' => true,
'variables' => true,
'request' => true,
'exceptions' => true
]
]
];
Only activate plugin whendebug === true
- Refactoring 😮💨
Go to the issues and submit your idea. If it's relevant, I might add it 🫶.
- To @maximebf for the base package php-debugbar.
- To @barryvdh for his implementation on Laravel.
- To @genxbe for his chaining methods on his plugin.
Please note that this plugin is provided as is, without any express or implied warranty of operation. By using this plugin, you agree to do so at your own risk. I am not responsible for any direct or indirect damage resulting from the use of this plugin, including loss of data, operating errors, service interruptions, or any other consequence related to the use of this plugin.