DevTools

Connect and protect diagnostic data

Install the extension, connect it to a VM service, and reveal only explicitly safe application values.

v0.1.0-dev.3Intermediateusecase_forge_devtools
Open source reference

Connect and protect diagnostic data

Add the development package

pubspec.yaml
dev_dependencies:
  usecase_forge_devtools: ^0.1.0-dev.3

Resolve dependencies, start the Dart or Flutter application in a non-product mode with a VM service, open DevTools for that service, and select UseCase Forge. No application initialize() call is required.

Product and release builds do not expose this channel. The extension is a development observer, not a production monitoring agent.

Read the execution screen

The overview identifies live UseCases, registered exact command types, current lifecycle position, terminal history, rejections, cancellation, and error routing. It cannot add commands, cancel executions, change state, replay work, or modify policies.

Keep application values hidden by default

Technical lifecycle metadata is available automatically. State contents, command fields, keys, error objects, stack traces, and rejection details stay hidden unless the application formats selected values.

lib/cart_usecase.dart
import 'package:usecase_forge/diagnostics.dart';

final class CartUseCase extends UseCase<CartState>
    with UseCaseDiagnosticsDataProvider {
  @override
  String get useCaseDiagnosticLabel => 'Shopping cart';

  @override
  Object? encodeUseCaseDiagnosticValue(
    UseCaseDiagnosticValueKind kind,
    Object? value,
  ) {
    if (kind == UseCaseDiagnosticValueKind.state && value is CartState) {
      return <String, Object?>{'itemCount': value.itemCount};
    }
    return null;
  }
}

Return only JSON-safe, bounded information that is safe to show. Returning null keeps a value hidden. Never expose credentials, tokens, personal data, complete payloads, or unrestricted toString() output.

If the screen is empty

  1. Confirm the package is a direct development dependency of the inspected application.
  2. Restart both the application and DevTools after resolving dependencies.
  3. Connect DevTools to the active VM service; opening the compiled index.html directly is unsupported.
  4. Use a non-product build and create at least one live UseCase.
  5. Check that core and DevTools protocol versions are compatible.
ARKTELOS

Purpose-built engineering systems for software that has to hold.