Crash Reporter

AndroidiOSFlutterReact Native

The Crash Reporter plugin captures and displays crash logs and uncaught exceptions from your app in real time. View full stack traces, exception types, timestamps, and thread information directly in Snapbug Desktop.

Features

  • Automatic capture of uncaught exceptions
  • Full stack trace viewer
  • Exception type and message display
  • Timestamp and thread information
  • Manual error reporting API

Android Setup

Add the Crash Reporter dependency to your module's build.gradle.kts:

dependencies {
    debugImplementation("ai.snapbug:snapbug-crashreporter:1.0.0")
    releaseImplementation("ai.snapbug:snapbug-crashreporter-no-op:1.0.0")
}

Or with version catalog:

[libraries]
snapbug-crashreporter = { module = "ai.snapbug:snapbug-crashreporter", version.ref = "snapbug" }
snapbug-crashreporter-no-op = { module = "ai.snapbug:snapbug-crashreporter-no-op", version.ref = "snapbug" }
info

The Crash Reporter automatically captures uncaught exceptions once the plugin is included. No additional initialization code is required beyond the standard SDK setup.

warning

Always use the -no-op variant for release builds to ensure zero overhead in production.

Flutter Setup

The Flutter plugin captures Flutter framework errors, uncaught Dart exceptions, and isolate errors.

Installation

Add the dependency to your pubspec.yaml:

dependencies:
  snapbug_flutter: ^1.0.0

Initialization

void main() {
  Snapbug.start(plugins: [
    SnapbugCrashReporter(catchFatalErrors: true),
  ]);
  runApp(MyApp());
}

Manual Error Reporting

try {
  // risky operation
} catch (error, stackTrace) {
  SnapbugCrashReporter.reportError(error, stackTrace);
}
lightbulb

Set catchFatalErrors: true to automatically capture Flutter framework errors and zone-level uncaught exceptions. For more granular control, use reportError to send specific errors manually.

React Native Setup

The React Native plugin captures uncaught JavaScript exceptions.

Installation

npm install snapbug-react-native

Initialization

import { Snapbug, SnapbugCrashReporter } from 'snapbug-react-native';
 
Snapbug.start({
  plugins: [
    new SnapbugCrashReporter({ catchFatalErrors: true }),
  ],
});

Manual Error Reporting

try {
  // risky operation
} catch (error) {
  SnapbugCrashReporter.reportError(error);
}

Viewing Crash Reports

Once connected to Snapbug Desktop:

  1. Select Crash Reporter from the left sidebar.
  2. Crashes appear in real time as they occur.
  3. Click on a crash entry to expand the full stack trace.
  4. Use the search and filter tools to find specific exceptions.