DebugBundle
Production debugging bundles for AI agents, with runtime error reporting and incident response.

DebugBundle provides runtime error reporting, crash reporting, incident response, endpoint health checks, and product analytics for humans and AI agents. It captures runtime failures, groups them into incidents, and publishes deterministic debug bundles. Its monitoring scope is customer-facing runtime behavior and endpoint health, not generic infrastructure metrics.
Works with AI coding agents including Codex, Claude Code, and Gemini CLI, as well as Cursor and GitHub Copilot. See the dedicated Codex, Claude Code, and Gemini CLI setup guides for native packages and direct MCP connections.
Why DebugBundle?
Modern AI agents are useful only when they get enough trustworthy context. DebugBundle packages the facts around a production incident into a versioned bundle instead of leaving agents to scrape dashboards, logs, traces, and chat threads.
Key properties:
- Agent-native bundles: deterministic failure and improvement bundles with errors, requests, responses, logs, frontend context, deploy metadata, runtime details, and reproduction hints.
- Interface parity: API, CLI, and MCP expose the same incident, bundle, probe, webhook, alert, project, and automation workflows.
- Local-first setup: start without a cloud account by writing events to
.debugbundle/local/events/, then connect to DebugBundle Cloud when ready.
- Safe SDKs: SDK failures are swallowed internally, sensitive fields are redacted before transport, and duplicate storms are suppressed locally.
- Self-hostable core: Compose-based stack for the web app, API, worker, Postgres, Redis, and S3-compatible object storage.
Quick Start
Choose the path that matches how you want to evaluate DebugBundle.
Cloud
Use Cloud when you are preparing a hosted deployment or want team-visible incidents, alerts, webhooks, GitHub automation, API access, and MCP access.
npm install -g @debugbundle/cli
debugbundle setup
debugbundle login
debugbundle connect
debugbundle connect creates or selects a cloud project, creates a write-only project token, and updates .debugbundle/local/connection.json. Put the shown project token in your hosted environment:
DEBUGBUNDLE_PROJECT_TOKEN=dbundle_proj_xxxxxxxxxxxx
Add the smallest SDK or ingestion path that matches your app, deploy it with the token configured, then verify ingestion:
debugbundle verify cloud --project-id proj_01HXYZ... --trigger-5xx
debugbundle incidents --source cloud
debugbundle inspect inc_01HXYZ...
See the full Cloud quickstart and connect-to-cloud guide.
Local-only
Use local-only mode when you want captured data and bundles to stay on the machine or storage volume where the SDK and CLI run.
npm install -g @debugbundle/cli
debugbundle setup --project-mode local-only
Initialize an SDK in local mode where supported, or use debugbundle watch for existing logs. After triggering a test error:
debugbundle process
debugbundle incidents --source local
debugbundle inspect inc_local_...
Local events are written under .debugbundle/local/events/; generated bundles are written under .debugbundle/bundles/. See the local-only guide.
Install an SDK
SDKs share the same capture concepts through language-idiomatic APIs. Client constructors, framework configuration and plugin activation remain runtime-specific. Common operations include: init, captureException, captureError, captureLog, captureRequest, captureMessage, setContext, probe, and flush.
| Runtime |
Package |
Install |
Main docs |
| Node.js |
@debugbundle/sdk-node |
npm install @debugbundle/sdk-node |
Node.js SDK |
| Browser |
@debugbundle/sdk-browser |
npm install @debugbundle/sdk-browser |
Browser SDK |
| Python |
debugbundle-python |
pip install debugbundle-python |
Python SDK |
| PHP |
debugbundle/sdk-php |
composer require debugbundle/sdk-php |
PHP SDK |
| Rust |
debugbundle |
cargo add debugbundle |
Rust SDK |
| Java |
com.debugbundle:debugbundle-spring-boot-starter |
Maven or Gradle dependency |
Java SDK |
| .NET |
DebugBundle.AspNetCore / DebugBundle.Sdk |
dotnet add package DebugBundle.AspNetCore |
.NET SDK |
| Go |
github.com/debugbundle/debugbundle-go/v3 |
go get github.com/debugbundle/debugbundle-go/v3 |
Go SDK |
| Ruby |
debugbundle |
gem install debugbundle |
Ruby SDK |
| Android |
com.debugbundle:debugbundle-android |
Maven or Gradle dependency |
Android SDK |
| iOS |
DebugBundle |
Swift Package Manager or CocoaPods |
iOS SDK |
| React Native |
@debugbundle/sdk-react-native |
npm install @debugbundle/sdk-react-native |
React Native SDK |
| WordPress |
debugbundle |
WordPress.org plugin directory |
WordPress plugin |
Initialize once at application startup. These connected examples use a server environment token, a browser relay or an explicitly configured mobile ingestion token. Verification and lifecycle details are in each SDK guide.
Node.js
npm install @debugbundle/sdk-node
import { debugbundle } from "@debugbundle/sdk-node";
debugbundle.init({
projectToken: process.env.DEBUGBUNDLE_PROJECT_TOKEN,
environment: "production",
service: "api"
});
Initialize once at server startup with DEBUGBUNDLE_PROJECT_TOKEN set in the server environment. Initialization registers the process exception and rejection hooks; request middleware belongs in the framework setup below.
Express, Fastify, Next.js, pino, winston, bunyan and browser relay handlers are supported. See the Node.js SDK guide.
Browser
npm install @debugbundle/sdk-browser
import { createDebugBundleBrowserSdk } from "@debugbundle/sdk-browser";
const debugbundle = createDebugBundleBrowserSdk();
debugbundle.init({
transportMode: "relay",
endpoint: "/debugbundle/browser",
environment: "production",
service: "web"
});
Initialize once in the browser entry point. Configure the matching backend relay route first; this relative URL does not create a server endpoint. Keep the backend project token on the server.
Browser-native capture works with React, Next.js client components, Vue, Angular, Svelte and vanilla applications. Use a backend browser relay for this setup. See the Browser SDK guide.
Python
pip install debugbundle-python
import os
import debugbundle
debugbundle.init(
project_token=os.environ["DEBUGBUNDLE_PROJECT_TOKEN"],
environment="production",
service="api",
)
Initialize once at application startup with DEBUGBUNDLE_PROJECT_TOKEN set in the server environment. Initialization installs the exception hooks. Add logging and framework adapters in Integrations.
Django, Flask, FastAPI, Python logging, structlog, loguru and browser relay helpers are supported. See the Python SDK guide.
PHP
composer require debugbundle/sdk-php
<?php
use DebugBundle\DebugBundle;
DebugBundle::init([
'projectToken' => getenv('DEBUGBUNDLE_PROJECT_TOKEN'),
'environment' => 'production',
'service' => 'api',
]);
Initialize in your application bootstrap after loading Composer’s autoloader. Set DEBUGBUNDLE_PROJECT_TOKEN in the server environment, initialization installs error, exception and shutdown hooks. Add framework and logger adapters in Integrations.
Laravel, Symfony, Monolog and browser relay adapters are supported. See the PHP SDK guide.
Rust
cargo add debugbundle
use debugbundle::Config;
let client = debugbundle::init(Config {
project_token: std::env::var("DEBUGBUNDLE_PROJECT_TOKEN").unwrap_or_default(),
environment: "production".into(),
service: "api".into(),
..Config::default()
});
Run this in application startup and retain client for the application lifetime. Set DEBUGBUNDLE_PROJECT_TOKEN in the server environment. The example sets environment and service explicitly; ..Config::default() supplies the remaining options. Initialization starts the client; panic observation and framework capture are explicit integrations. Flush only when verifying an event or during controlled shutdown.
Tokio, Tower, Axum and Actix Web, composable tracing/log integrations and browser relays are supported. See the Rust SDK guide.
Java
<dependency>
<groupId>com.debugbundle</groupId>
<artifactId>debugbundle-spring-boot-starter</artifactId>
<version>3.1.4</version>
</dependency>
debugbundle:
project-token: ${DEBUGBUNDLE_PROJECT_TOKEN}
environment: production
service: api
project-mode: connected
For Spring Boot 3, put this in application.yml and set DEBUGBUNDLE_PROJECT_TOKEN in the server environment. The starter initializes the client through Spring configuration. Other Java runtimes use the adapters below.
Spring Boot, servlet WARs, JAX-RS/RESTEasy, WildFly/JBoss, vanilla Java and the Java agent have runtime-specific setup. See the Java SDK guide.
.NET
dotnet add package DebugBundle.AspNetCore
using DebugBundle.AspNetCore;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDebugBundle(options =>
{
options.ProjectToken = builder.Configuration["DEBUGBUNDLE_PROJECT_TOKEN"];
options.Environment = builder.Environment.EnvironmentName;
options.Service = "api";
});
var app = builder.Build();
app.UseDebugBundle();
Add this to ASP.NET Core Program.cs, with DEBUGBUNDLE_PROJECT_TOKEN in application configuration. Keep your endpoint mappings and app.Run() after the middleware. The hosted service handles application shutdown.
ASP.NET Core, Microsoft.Extensions.Logging, gRPC, Worker Service, Hangfire, Azure Functions isolated worker and logging adapters have dedicated integrations. See the .NET SDK guide.
Go
go get github.com/debugbundle/debugbundle-go/v3
import (
"os"
debugbundle "github.com/debugbundle/debugbundle-go/v3"
)
// Inside application startup:
client := debugbundle.New(debugbundle.Config{
ProjectToken: os.Getenv("DEBUGBUNDLE_PROJECT_TOKEN"),
Environment: "production",
Service: "api",
})
Set DEBUGBUNDLE_PROJECT_TOKEN in the server environment and retain the client for your service lifetime. Add the imports to the file’s import block and create the client inside main or your bootstrap function. Use a bounded flush during controlled shutdown.
net/http, Gin, Echo, slog, zap, zerolog and browser relay handlers are supported. See the Go SDK guide.
Ruby
gem install debugbundle
require "debugbundle"
DebugBundle.init(
project_token: ENV["DEBUGBUNDLE_PROJECT_TOKEN"],
environment: "production",
service: "api"
)
Initialize once at application startup with DEBUGBUNDLE_PROJECT_TOKEN set in the server environment. Initialization arms best-effort process exception capture. Add framework and logger adapters below.
Rails, Rack, Sidekiq, Ruby Logger, Semantic Logger and browser relay handlers are supported. See the Ruby SDK guide.
Android
dependencies {
implementation(platform("com.debugbundle:debugbundle-android-bom:3.1.4"))
implementation("com.debugbundle:debugbundle-android")
}
import com.debugbundle.android.DebugBundle
import com.debugbundle.android.DebugBundleConfig
// Inside Application.onCreate(), after super.onCreate():
DebugBundle.init(
application = this,
config = DebugBundleConfig(
projectToken = BuildConfig.DEBUGBUNDLE_PROJECT_TOKEN,
environment = "production",
service = "android-app",
),
)
Call this from your registered Application.onCreate(). Define the app-owned BuildConfig.DEBUGBUNDLE_PROJECT_TOKEN field in Gradle. A token embedded in a mobile app is a public write-only ingestion credential, never a member token.
Native Android capture, crash/ANR replay, WorkManager, OkHttp, Ktor, Navigation, Compose and Timber integrations are available. See the Android SDK guide.
iOS
.package(
url: "https://github.com/debugbundle/debugbundle-swift",
from: "3.1.5"
)
import Foundation
import DebugBundle
DebugBundle.initialize(
DebugBundleConfig(
projectToken: Bundle.main.debugBundleProjectToken,
environment: "production",
service: "ios-app"
)
)
Add the Swift Package dependency to your application target. Initialize once from SwiftUI app initialization or UIKit launch, with DebugBundleProjectToken in Info.plist. Mobile tokens are public write-only ingestion credentials, never member tokens.
UIKit, SwiftUI, URLSession, Alamofire, SwiftLog, crash replay and offline queueing are supported. See the iOS SDK guide.
React Native
npm install @debugbundle/sdk-react-native
cd ios && pod install
import { DebugBundle } from "@debugbundle/sdk-react-native";
DebugBundle.init({
projectToken: process.env.EXPO_PUBLIC_DEBUGBUNDLE_TOKEN,
environment: __DEV__ ? "development" : "production",
service: "mobile-app"
});