Feature SDKs (Pro)
app_debugger_miniapp Pro
- Tier
- Proversion 0.3.4
- Command
archipelago generate app_debugger_miniapp- Generates
features/app_debugger_miniapp/app_debugger_miniappfeatures/app_debugger_miniapp/app_debugger_miniapp_apifeatures/app_debugger_miniapp/app_debugger_miniapp_noop
- Generates first
- app_debugger, webview_sdk_advancedwhen needed and missing, so there is nothing to install first
- Depends on
- shared_identifiersgenerate these first
Mini-app bridge inspector sub-brick for
app_debugger. Adds a Bridge tool showing JS↔native mini-app bridge traffic (invocations, denials, errors) as a live, tappable list with a detail dialog. Automatically swapped to a no-op stub in production-flavor builds viabuild_prepare.
Variables
This brick has no generation-time variables.
Install
Interactive
archipelago generate app_debugger_miniappNon-interactive (CI)
archipelago generate app_debugger_miniapp --config my_config.jsonPrerequisites
app_debuggeris generated first when the project lacks it.webview_sdk_advancedis a hard dependency (app_debugger_miniappandapp_debugger_miniapp_noopboth depend on itswebview_advancedpackage at../../webview_advancedforMiniAppBridgeEvent/MiniAppBridgeDispatcher).pre_gen.dartself-generates it viaSubBrickGeneratorif it is missing (since 0.2.2), so no manual step is needed.
Generated Structure
features/
└── app_debugger_miniapp/
├── app_debugger_miniapp_api/
│ └── lib/src/
│ ├── bridge_inspector_sdk.dart
│ └── models/ # BridgeInspectorConfig
├── app_debugger_miniapp/
│ └── lib/src/
│ ├── bridge_inspector_sdk_impl.dart
│ ├── bridge_inspector_page.dart
│ └── di/
└── app_debugger_miniapp_noop/
└── lib/src/di/Public API
final sdk = getIt<BridgeInspectorSDK>();
// Wire into your mini-app host so every bridge call is captured:
dispatcher.onEvent = sdk.observerCallback; // null-safe in the noop stub
sdk.eventStream.listen((event) {
print('${event.capability}.${event.method} -> ${event.isOk}');
});
sdk.currentEvents; // buffered snapshot, most-recent last
sdk.clearEvents();Events are held in an in-memory ring buffer capped at BridgeInspectorConfig.maxEntries (default 200) — the oldest entry is dropped once full.
DI & Wiring
AppDebuggerMiniappPackageModuleis declared underarchipelago: di_modulesand registered into the app injector bypost_gen.BridgeInspectorSDKImplis@Singleton(as: BridgeInspectorSDK)(eager, since 0.2.2); it registers itself withFeatureSDKRegistryand registersBridgeInspectorPagewithDebuggerPanelPageRegistryin its constructor.post_genpatches thearchipelago:debug_panel_pagessentinel inapp_debugger's owndi/debug_tools.dartto resolve the SDK eagerly before first frame (fixed in 0.2.2). The marker moved betweenapp_debuggerversions, so the hook uses the first file that has it:app_debugger'slib/src/di/debug_tools.dart(2.0.0 and later), itslib/src/app_debugger_sdk_impl.dart(1.3.0 to 1.15.x), then the app'slib/bootstrap.dart(older), and adds the imports and path dependencies to that package. A file that already resolves the SDK is left as it is. If no file has the marker,pre_genprints the lines to add and stops before it writes any file.
Dependencies
app_debugger_miniapp and app_debugger_miniapp_noop packages depend on webview_advanced (the package generated by webview_sdk_advanced) plus the workspace's feature_sdk, router_registry, identifiers, dependencies. No external pub.dev packages beyond what webview_sdk_advanced already pulls in.
Platform Setup
None beyond whatever webview_sdk_advanced already requires.
Limitations
- The noop package (
app_debugger_miniapp_noop) registers nothing:BridgeInspectorSDKis only ever resolved from insideapp_debugger's own production-stripped composition (per 0.2.1 CHANGELOG), so there is no always-inert stub class to fall back on if a call site resolves it unconditionally from always-on app code.
Changelog
Run archipelago brick info app_debugger_miniapp to see the latest published version. Enterprise customers can read the full CHANGELOG.md in the brick source repository.