CARP Debug Toolkit
An in-app debugging toolkit for CARP (and any) Flutter apps.
carp_debug_flutter adds a floating button to your app. Tapping it opens a self-contained debug menu that is independent of the host app's widget tree: it renders in its own theme, localization and navigator, so it keeps working when a screen throws or navigation breaks.
The package is designed mainly for CARP apps. It ships adapters for shared_preferences and the sembast database, and a runtime override layer for the --dart-define launch arguments that CARP apps rely on. It works in any Flutter app.
Features
Environment and servers
Switch the deployment server and override any --dart-define launch argument at runtime, then apply the change live or restart the app.
Shared preferences
Inspect, search, edit, add and delete any key, including the CARP user data.
Database
Browse the local sembast database: list stores and records, delete records and clear stores.
Device and app
Device and app metadata (model, OS, version, build) and screen metrics.
Logs and errors
Captured debugPrint output, framework errors and uncaught async errors.
Custom tools
Add your own screens to the debug menu by implementing DebugTool.
Limitation
The toolkit handles exceptions, crashed screens and broken navigation. A synchronous infinite loop on the UI isolate, however, freezes all Dart rendering, including the toolkit.
Requirements
| Platform | Requirement |
|---|---|
| iOS | Minimum deployment target iOS 15.0. Swift Package Manager (recommended) or CocoaPods. |
| Android | minSdk 24 and compileSdk 34 or higher. |
See Installation for the platform setup.
Next steps
Installation
Add the package as a dev dependency and configure iOS and Android.
Quickstart
Wire the toolkit in so it runs in debug builds and is excluded from release builds.
Production builds
Keep the toolkit out of release and profile archives, and verify it.
Environment and servers
Override launch arguments and switch servers at runtime.