Application Debugging

Debugger Interface

$app->getDebugger()

Accessing debugger service.

/** @var \WebinoAppLib\Service\DebuggerInterface $debugger */
$debugger = $app->getDebugger();

$app->debug()

Dumping information about a variable in readable format.

$app->debug($var);

Returning output instead of printing it.

$output = $app->debug($var, true);

$app->debug()->barDump()

Dumping information about a variable into Tracy debugger bar.

$app->debug()->barDump($var);

$app->debug()->timer()

TODO...

$app->debug()->timer();

$app->debug()->setBarInfo()

Setting information into Tracy debugger bar System info panel.

$app->debug()->setBarInfo('Test Label 01', 'Test Value01');
// or as array
$app->debug()->setBarInfo(['Test Label 02' => 'Test Value02']);

$app->debug()->setBarPanel()

Setting custom debugger panel into Tracy bar.

/** @var \WebinoAppLib\Debugger\Bar\AbstractPanel $panel */
$app->debug()->setBarPanel($panel);
// or with an optional name
$app->debug()->setBarPanel($panel, 'myDebugBarPanel');

Debugger Config

DebugBarInfo

Configuring debugger bar info.

use WebinoAppLib\Feature\Config;
use WebinoConfigLib\Feature\DebugBarInfo;

new Config([
    new DebugBarInfo([
        'Custom Info 01' => 'Custom Info Value 01',
        'Custom Info 02' => 'Custom Info Value 02',
    ]),
]);

DebugBarPanel

Configuring debugger bar panel.

use WebinoAppLib\Feature\Config;
use WebinoAppLib\Feature\DebugBarPanel;

new Config([
    // invokable
    new DebugBarPanel('myPanel', MyPanel::class),
    // service factory
    new DebugBarPanel('myPanel', MyPanel::class, MyPanelFactory::class),
]);