Skip to content

app_debugger Pro

In-app developer tools panel — draggable FAB overlay, 10 painter debug toggles, device/package info pages. build_prepare swaps to noop in release builds.

Version: 1.0.0

Variables

This brick has no generation-time variables.

Generated Packages

PackagePurpose
app_debugger_apiShared AppDebuggerSDK contract
app_debuggerDebug implementation — FAB overlay + panel + cubits
app_debugger_noopRelease stub — all methods no-op

Usage

Interactive

bash
archipelago generate app_debugger

Non-interactive (CI)

bash
archipelago generate app_debugger --config my_config.json

Generated Structure

features/
└── app_debugger/
    ├── app_debugger_api/
    │   └── lib/src/
    │       └── models/
    ├── app_debugger/
    │   └── lib/src/
    │       ├── di/
    │       └── presentation/
    │           ├── cubits/
    │           ├── fab/
    │           └── panel/
    │               └── pages/
    └── app_debugger_noop/
        └── lib/src/
            └── di/

Wiring into MaterialApp

Wire the overlay into MaterialApp.router's builder parameter so the FAB has a proper Material/Directionality ancestor:

dart
@override
Widget build(BuildContext context) {
  final debuggerSdk = GetIt.instance<AppDebuggerSDK>();
  return MaterialApp.router(
    // ...
    builder: (context, child) =>
        debuggerSdk.overlay(child: child ?? const SizedBox.shrink()),
  );
}

In debug builds this renders the draggable FAB + panel. In release builds the noop implementation returns the child unchanged.

build_prepare Swap

yaml
build_prepare:
  mappings:
    - debug: app_debugger
      release: app_debugger_noop

Run dart run devtools/build_prepare/bin/build_prepare.dart before a release build to swap the dependency.

Painter Flags

The debug panel exposes 10 Flutter rendering diagnostic toggles (state persists across restarts via hydrated_bloc):

FlagDescription
repaintRainbowFlash repainted regions with cycling rainbow colors
paintBaselinesShow alphabetic and ideographic text baselines
paintLayerBordersDraw borders around each compositing layer
paintPointersShow pointer (touch/mouse) events as arrows
paintSizeOverlay bounding box for every render object
repaintTextRainbowFlash repainted text areas specifically
disableClipLayersSkip clip layer compositing (performance test)
disablePhysicalShapeLayersSkip physical shape layers (performance test)
disableOpacityLayersSkip opacity layer compositing (performance test)
profileBuildsLog widget build times to the console

Built-in Panel Pages

  • Painter Flags — Toggle all 10 flags with a list of switches
  • Device Info — OS version, screen size, device model (via device_info_plus)
  • Package Info — App name, version, build number (via package_info_plus)

Sub-Bricks

Additional debug panel pages are available as opt-in sub-bricks that plug into the same panel via DebuggerPanelPageRegistry:

BrickDescription
app_debugger_networkAlice HTTP inspector
app_debugger_websocketWebSocket traffic inspector
app_debugger_analyticsAnalytics event inspector
app_debugger_feature_flagRuntime flag spoofer
app_debugger_storageFilesystem storage breakdown

Install app_debugger first — it provides the archipelago:debug_panel_pages sentinel that sub-bricks hook into.

Built by Banua Coder