Debugger Helpers
The package exposes one helper.
debugbar()
php
function debugbar(): Debuggerdebugbar() is the public entry point for the package.
Behavior:
- checks whether
Quantum\Debugger\Debuggeris registered inQuantum\Di\Di - registers it if missing
- returns the container-managed instance
Lifecycle implications
- repeated
debugbar()calls return the same DI-managedDebuggerinstance for the current process - that instance keeps the same
DebuggerStoreandDebugBarobjects unless the container is rebuilt - helper consumers do not need to pass dependencies manually in normal application code
Where the helper is used in core
Outside the Debugger package, the framework calls it in one place: the default web layout templates render the toolbar with <?= debugbar()->render() ?>.
For application code, this helper is the supported API. The framework does not expose a separate factory class for the package.
