crumbs library
crumbs: passive runtime inspector for Flutter apps.
Captures HTTP traffic (a pluggable adapter), logs, uncaught exceptions, debug dumps, events, gate checks, queries and cache operations into in-memory ring buffers, and serves them over VM Service extensions.
Extension points:
- CrumbsPlugin.registerHttpAdapter for pluggable HTTP capture (Dio, package:http, Chopper, Magic's Http facade).
- CrumbsPlugin.registerWatcher for additional data collectors (model lifecycle, cache operations, custom domain events).
Records are read via CrumbsStore.recent<X>(limit). Live updates via
broadcast streams (CrumbsStore.onHttpRecord, etc.).
Classes
- CacheRecord
-
An immutable cache operation, recorded through CrumbsStore.recordCache
by a watcher of the app's cache layer (on Magic, the cache watcher
magic_devtoolsregisters). - CrumbsDowelProvider
- Contributes crumbs:* commands and MCP tool descriptors to the dowel dispatcher.
- CrumbsFileSink
- Persists the redacted log, event and exception records to rotating JSONL files, so a timeline survives the in-memory ring buffers.
- CrumbsHttpAdapter
- Contract for HTTP capture adapters that feed CrumbsStore.
- CrumbsPlugin
- crumbs plugin install entry. Idempotent.
- CrumbsRedaction
- Masks credentials in records before CrumbsStore buffers them.
- CrumbsStore
- In-memory ring-buffer store for the watcher record types plus the frame-perf buffer.
- CrumbsWatcher
- Contract for additional data collectors registered via CrumbsPlugin.registerWatcher.
- DumpRecord
- An immutable debugPrint output record captured by DumpWatcher.
- DumpWatcher
- Captures all debugPrint output by overriding the global callback.
- EventRecord
-
An immutable app event record captured by an event watcher
(e.g. MagicEventWatcher, shipped in
magic_devtools). - ExceptionRecord
- An immutable exception record captured by ExceptionWatcher.
- ExceptionWatcher
-
Hooks both FlutterError.onError and
PlatformDispatcher.instance.onErrorto capture all unhandled exceptions in a Flutter app. - FramePerfRecord
-
An immutable per-frame performance record captured by
FramePerfWatcher. - FramePerfWatcher
- Captures per-frame performance by joining two sources the engine reports separately: frame magnitude from SchedulerBinding.addTimingsCallback, and per-frame attribution drained from FlutterTimeline at the end of every frame.
- GateRecord
-
An immutable authorization gate check record captured by a gate watcher
(e.g. MagicGateWatcher, shipped in
magic_devtools). - HttpRequestRecord
- An immutable HTTP request/response record captured by a CrumbsHttpAdapter.
- LogRecordEntry
- An immutable log record captured by LogWatcher.
- LogWatcher
-
Subscribes to
Logger.root.onRecordand feeds CrumbsStore.recordLog. - ModelRecord
-
An immutable model lifecycle event, recorded through
CrumbsStore.recordModel by a watcher of the app's model layer (on Magic,
the model watcher
magic_devtoolsregisters). - QueryRecord
-
An immutable database query record captured by a query watcher
(e.g. MagicQueryWatcher, shipped in
magic_devtools).
Enums
- CrumbsKind
- The ten ring buffers of CrumbsStore, for CrumbsStore.setCapacity.