DumpWatcher class final

Captures all debugPrint output by overriding the global callback.

Installs by replacing the global debugPrint function with an interceptor that records a DumpRecord to CrumbsStore AND calls the previous debugPrint value (chain-preserve; Sentry/Bugsnag pattern). On uninstall, restores the previous reference exactly.

This watcher is opt-in and NOT auto-installed by CrumbsPlugin.install. Register it explicitly:

CrumbsPlugin.registerWatcher(DumpWatcher());

install is gated on kDebugMode (or allowInRelease set to true before calling install). In a release build it returns without replacing debugPrint. allowInRelease is read at runtime, so the watcher's code still ships in a release build that references it; keeping it out is the consumer's build-mode guard around the registration.

Implemented types

Constructors

DumpWatcher()

Properties

allowInRelease ↔ bool
Allow capturing in release builds. Defaults to false; override before calling install only when you explicitly need release-build capture.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
name → String
Human-readable watcher name.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

install() → void
Wire the watcher's listening hook (event subscription, override, etc.).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
uninstall() → void
Tear down the hook (test isolation).
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited