Application Debugging¶
- Powered by Tracy
Debugger Interface¶
$app->getDebugger()¶
Accessing debugger service.
/** @var \WebinoAppLib\Service\DebuggerInterface $debugger */
$debugger = $app->getDebugger();
- see: Debugger Example
$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()->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 WebinoConfigLib\Feature\DebugBarInfo;
Webino::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\DebugBarPanel;
Webino::config([
// invokable
new DebugBarPanel('myPanel', MyPanel::class),
// service factory
new DebugBarPanel('myPanel', MyPanel::class, MyPanelFactory::class),
]);