API reference > @kontsedal/olas-core > DebugBus
DebugBus type
The shape of root.debug. Subscribe to receive every DebugEvent until the returned unsubscribe is called.
The bus replays a snapshot of the *live controller tree* to every new subscriber synchronously inside subscribe(...) — so a panel that mounts after createRoot() sees the existing tree immediately, not just future events. Event types other than controller:* are not buffered.
queryEntries() returns a fresh inspector snapshot — current state of every cached entry. Useful for "what's in the cache right now?" views.
Signature:
typescript
type DebugBus = {
subscribe(handler: (event: DebugEvent) => void): () => void;
queryEntries(): DebugCacheEntry[];
};References: DebugEvent, DebugCacheEntry