Debugger Contracts
The Debugger package exposes one explicit interface and one practical message contract used by the framework.
DebuggerStoreInterface
Quantum\Debugger\Contracts\DebuggerStoreInterface defines the storage API behind Debugger.
Methods
init(array $keys): voidall()has(string $key): boolget(string $key)set(string $key, $value): voiddelete(string $key): voidflush(): void
Current DebuggerStore behavior
Quantum\Debugger\DebuggerStore implements the interface with an in-memory static array.
Initialization
init($keys) only creates missing keys. Existing cells are preserved.
That means calling initStore() multiple times is idempotent for already-created tabs.
Reads and existence
has($key)checksisset(...)get($key)returns the stored array or[]all()returns the full static store array
Because initialized cells always hold arrays, has($key) remains true even after delete($key) clears the cell.
Writes
set($key, $value) only accepts array payloads in practice.
For each array entry, it appends a separate item:
$store->set('messages', ['info' => 'ready']);becomes:
[
'messages' => [
['info' => 'ready'],
],
]This append-only shape is what Debugger::createTab() expects when it replays messages.
Deletion
delete($key)resets one cell to[]flush()resets the entire static store to[]
Neither method repopulates built-in tabs automatically.
Message-level contract
Debugger::addToStoreCell($cell, $level, $data) stores values in a shape that is later interpreted as a collector method call.
So this write:
$debugger->addToStoreCell('messages', 'warning', 'Disk nearly full');is later replayed as:
$debugBar['messages']->log('warning', 'Disk nearly full');The level becomes the entry's label in the toolbar. MessagesCollector::log() accepts any level string, so a custom level shows up as its own label.
Built-in tab contract
The package only renders five store-backed tabs:
messagesqueriesrouteseventsmails
You can write to any key in DebuggerStore, but Debugger::render() only renders those built-in names.
The store holds only direct writes
The store contains exactly what code wrote with addToStoreCell(): render() never writes into it or clears it, so a direct write is always shown, before the collected entries of its tab.
If you need additional tabs, treat that as package customization rather than normal application usage.
