Skip to main content

8 posts tagged with "debugging"

View All Tags

· 19 min read
Elisha Sterngold

Ten MCP servers for debugging in two groups: servers that let the agent read every log line, and servers that show it only errors and crashes

The 10 Best MCP Servers for Debugging Production Apps in 2026, Compared​

Last updated: December 1, 2026.

When we recorded the demo for our MCP server, the bug came with a release. Customers said payments had started failing after it shipped — but only some of them. Release 2.4.0 of the checkout API had lost the exchange rate for Canadian dollars, so every payment in CAD was charged NaN and declined, while orders in US dollars, euros and pounds went through.

I asked Claude, in plain English, why payments were failing. It read Shipbook's releases, error groups and logs, compared 2.4.0 with 2.3.0, and found the missing rate.

The part that mattered was not the model. It was what the model could see. The cause was a pattern across many sessions — one currency, one release — and an agent can only spot a pattern in data it can reach. With the logs and the releases in reach, it was a few queries away. With only crash reports, the agent sees what happened to crash, which here was nothing at all.

That is the question to ask every MCP server on this list. An MCP server is a doorway, and the agent can only debug what is on the other side of it.

One disclosure before the list: I am the founder of Shipbook, and Shipbook is the first entry. Read that entry knowing who wrote it. For the other nine, I checked every fact below on the vendor's own docs, pricing page or GitHub repository on December 1, 2026, and each entry says where the tool is the better choice.

The Question That Splits This List​

Ask each vendor the same thing: if a bug throws no error, can my agent still find it through your MCP server?

The answers fall into two groups.

Servers that open the logs. The agent can search every line your application wrote — by user, by time, by text — whether or not an error was reported. Shipbook, Sentry, Datadog, Better Stack, New Relic, Grafana, Embrace and Bugfender are here. Within this group, the difference is what the logs are for: in Shipbook, Bugfender and Embrace they are the app's own logs, tied to a user and a session on a phone or in a browser; in the suites they sit next to traces, metrics and infrastructure, searched with the suite's own query language.

Servers that open the errors. The agent sees crashes, exceptions and their stack traces, and the breadcrumbs or events attached to them. Rollbar and Firebase Crashlytics are here, and so are BugSnag and Luciq. For a bug that throws, this is often enough. For a bug that throws nothing — a wrong total, a discount that silently comes out as zero — there is nothing to read.

There is a second question, and it splits the list differently: who writes the fix? Every server here lets the agent in your editor read the data and then change your code itself. Some vendors also run their own agent that reads your repository and opens the pull request for you.

The Comparison Table​

ToolWhat the agent can readA bug with no error?Hosted, OAuthVendor opens a fix PRMCP on the free plan
ShipbookLogs, recurring issues, alerts, releases, app healthYes, every log lineYesYesYes
SentryIssues, errors, logs, tracesYes, with Sentry LogsYes (beta), or localYes, Seer (paid add-on)Yes
DatadogLogs, traces, metrics, RUM, error trackingYesYesYes, Bits Code (AI credits)Not stated in its docs
Better StackLogs, spans, metrics, exceptions, RUM, by SQLYesYesYes, AI SRE (paid plans)Yes
New RelicLogs, error groups, traces, NRQLYesYesNoNo
Grafana CloudLoki logs, traces, metrics, profilesYesYesNone foundYes, up to 3 AI users
Embrace (now Cortex XCOR RUM)Crashes, exceptions, logs, spansYes, capped per sessionYesNone foundAll XCOR RUM users
BugfenderLogs, network requests, crashes, devicesYesYesNone foundNot stated in its docs
RollbarErrors with stack traces, deploys, replaysNoNo, local (npx)Yes, Resolve (AI credits)Yes
Firebase CrashlyticsCrashes and non-fatal errorsNoNo, local (npx)None foundYes, free

"None found" means I found no such feature in the vendor's docs, not that it cannot exist. Every server above documents setup for Cursor and Claude Code.

1. Shipbook​

Shipbook is a logging platform for apps — iOS, Android, Flutter, React Native, the browser, and Node.js and Python backends — and its MCP server hands an agent the same things a person on the team sees. Eight tools: search the logs by severity, user email, device, session and time range; read the recurring errors that Loglytics has grouped and ranked; list the alerts that fired and fetch any one of them; read release health and daily crash-free rates; list the account's apps and create a new one.

In Claude, Shipbook is a connector. Open Settings → Connectors, search for Shipbook, and click Connect — or open the Shipbook connector directly. You log in to Shipbook once, and Claude can read your logs on the web, in Claude Desktop, in Claude Code and on your phone. No URL to copy, no token, no config file.

In other tools the server is hosted at https://api.shipbook.io/mcp with OAuth 2.1, so there is still no token to paste: Cursor and VS Code have one-click installs, and Codex, Devin Desktop and Google Antigravity take one line of config.

Besides searching the logs, the agent can work in two more ways:

  • It can start from your issues. Loglytics groups the recurring errors and warnings in your logs into issues and shows how many sessions each one hit. So "Fix the issues in Loglytics" is a complete prompt: the agent reads the list, pulls the logs of each issue, and goes to the code.
  • An alert can start it. When a Shipbook alert fires, it can call a webhook with the alert's id. An agent listening on that webhook passes the id to the MCP server, reads the alert and its logs, and starts investigating before anyone on the team has opened the email.

Shipbook can also write the fix itself, without an agent of your own. Connect a GitHub repository, and each Loglytics issue gets an AI analysis — the root cause, the file and line, and a suggested fix — with a Create pull request button that opens the fix as a PR on its own branch. Nothing is merged until you review it.

Best for: app teams that want their agent to see every log from real users' sessions, starting from the issues that matter.

Price: the MCP server is part of every plan, including the free one: 100K logs a day with 24-hour retention, unlimited team members and apps. Paid plans start at $50 a month for 1M logs a day and 7-day retention. See pricing.

Where it falls short: it is logs and errors, not observability. There are no traces, metrics or infrastructure data for the agent to read, and backend SDKs exist only for Node.js and Python. On the free plan the agent can look back only one day. The pull-request flow works with GitHub today; GitLab and Bitbucket are not supported yet.

2. Sentry​

With Sentry's MCP server the agent can list and read issues, and Sentry's AI search tools find errors, traces and — since Sentry added a logs product in 2025 — log lines. It runs hosted at https://mcp.sentry.dev/mcp with OAuth, or locally, which also covers self-hosted Sentry.

Its strongest part is Seer, Sentry's own debugging agent: root-cause analysis, a fix, and a pull request, or a hand-off to Claude Code, Cursor or Copilot. The MCP server can start a Seer analysis directly.

Best for: teams already on Sentry for errors, who want one tool for issues, traces and logs.

Price: the pricing page lists MCP access on the free Developer plan (one user). Team is $26 a month billed annually. Seer is an add-on at $40 per active contributor a month on paid plans, and Sentry's docs say it moves to usage-based credits on December 8, 2026. See Sentry pricing.

Where it falls short: the server is still labeled beta. In local mode, the AI search tools need your own LLM API key. And the logs are built around issues and traces: for a bug that never became an issue, the agent searches a flat list of log lines, with no session to read them in. Full comparison: Shipbook vs Sentry.

3. Datadog​

Datadog's MCP server went GA in March 2026, and it has the widest reach of anything here: logs, traces, metrics, RUM events and error tracking, hosted with OAuth, with setup documented for over a dozen clients. If your infrastructure already reports to Datadog, the agent can follow a problem from the app to the service to the host.

For fixes, Datadog has Bits Code, a separate agent that locates the offending code, writes and tests a fix, and opens a pull request.

Best for: companies standardized on Datadog, where the bug is as likely to be in a service or a host as in the app.

Price: I could not find a price for the MCP server itself in its docs; they mention a fair-use limit of 50 calls per 10 seconds. Bits Code is billed in AI credits — about 5 credits per code fix, with credits from $500 for 500 a month on an annual commitment or $1.30 each on demand. See Datadog AI credits pricing.

Where it falls short: in Datadog a log is searchable only if you paid to index it, and the search speaks Datadog's query syntax — built for infrastructure, not for one user's session on a phone. Full comparison: Shipbook vs Datadog.

4. Better Stack​

Better Stack's MCP server lets the agent run SQL over a source's logs, spans, metrics, web events and exceptions, and look at log patterns, traces, errors and RUM sessions. It is hosted at https://mcp.betterstack.com with OAuth, and Cursor has a one-click install.

Its AI SRE, a separate product in the browser and Slack, can clone your repositories, write code and open GitHub pull requests.

Best for: teams already sending their server logs to Better Stack, who are happy to let the agent write SQL.

Price: Better Stack says the MCP server is available on every plan, including free. AI SRE needs a paid plan and is billed by consumption. See Better Stack's MCP docs.

Where it falls short: it is a server-side platform first. I did not find mobile SDKs in what I checked, so for an iOS or Android app the agent would see what your backend logged, not what the phone did.

5. New Relic​

New Relic's MCP server — renamed New Relic Ground Truth when it went GA in September 2026 — gives the agent recent logs, log analysis per entity, Errors Inbox groups, distributed traces and any NRQL query. It is hosted at https://mcp.newrelic.com/mcp/ with OAuth.

Best for: teams whose backend and mobile apps already report to New Relic.

Price: New Relic says MCP is not available to Free plan accounts. The core tools come with a paid plan; advanced tools need Advanced Compute and are metered. See New Relic pricing.

Where it falls short: it has no fix flow of its own. Its one GitHub tool suggests issues for gaps in your instrumentation, which Copilot Enterprise can then turn into a PR — not fixes for bugs in your app. And new mobile apps log at WARN by default, so unless you raise the level, the agent sees only what already looked like a problem.

6. Grafana Cloud​

Grafana Cloud's MCP server, hosted at https://mcp.grafana.com/mcp with OAuth 2.1, gives the agent Loki logs through LogQL, Tempo traces, Prometheus metrics, Pyroscope profiles and browser errors. There is also an open-source server you run yourself against your own Grafana.

Best for: teams whose logs already live in Loki, and anyone who wants an open-source option.

Price: connecting through the Cloud MCP server counts you as an active AI user. The free tier allows 3 active AI users a month; Pro is $20 per active AI user on top of the $19 monthly platform fee. See Grafana pricing.

Where it falls short: it is a window onto whatever you send to Grafana, and it assumes you can write — or trust the agent to write — LogQL. I found no fix or pull-request feature.

7. Embrace (now Cortex XCOR RUM)​

Embrace was the mobile-first observability company, and its MCP server reflects it: crashes, exceptions, logs, spans and network endpoints from iOS, Android, React Native, Unity and the web, hosted at https://mcp.embrace.io/mcp with OAuth. Palo Alto Networks has completed its acquisition of Embrace, and its docs now call the product Cortex XCOR RUM.

Best for: larger mobile teams that want sessions, crashes, network calls and logs from one mobile-specific product.

Price: the docs say the MCP server is available to all XCOR RUM users. The pricing page now redirects to the homepage, so I could not confirm current plan prices.

Where it falls short: it does not keep every log line — the iOS SDK caps logs per session (500 errors, 200 warnings, 100 info logs) — so the agent may not find the line it needs. I found no fix or pull-request feature.

8. Bugfender​

Bugfender is a remote logger like Shipbook: it keeps everything the app logs and organizes it by device. Its MCP server, hosted at https://mcp.bugfender.com/mcp with OAuth, gives the agent logs, network requests, crashes, issues, devices and user feedback.

Best for: teams on platforms Shipbook does not cover, such as Unity and .NET MAUI.

Price: its docs do not say which plans include the MCP server. Team starts at $49 a month and Pro at $99. See Bugfender pricing.

Where it falls short: the agent reads; nothing proposes a fix or opens a pull request. I found no backend SDK in its docs, so it cannot follow a request into your server. Full comparison: Shipbook vs Bugfender.

9. Rollbar​

Rollbar's MCP server is open source under the MIT license and runs locally with npx and an access token. The agent reads items — errors with their stack traces and telemetry — plus deploys and session replays.

The interesting part is Rollbar Resolve, which reads the error, opens a pull request with a fix, and can be started from the MCP server. Rollbar says it is available on every plan, including free, billed in AI credits with no per-seat charge.

Best for: teams that already track errors in Rollbar and want an automated fix PR without a per-seat AI add-on.

Price: free plan included. Paid plans are priced by volume. See Rollbar pricing.

Where it falls short: Rollbar is not a log store, so there are no logs to search: a bug that throws nothing is invisible to it. The server runs only locally, so each developer manages a token.

10. Firebase Crashlytics​

The Firebase MCP server runs locally (npx -y firebase-tools@latest mcp) and includes Crashlytics tools: get an issue, list its events, read a report, and update an issue's state. It ships an investigation guide that tells the agent how to work through a crash.

Best for: every mobile app already on Crashlytics. It costs nothing, and for a crash with a clear stack trace the agent may need nothing more.

Price: Crashlytics is free, and Firebase lists no separate charge for the MCP server. See Firebase pricing.

Where it falls short: it is crashes and non-fatal errors only. Crashlytics keeps custom logs only alongside a crash, so for a freeze, a wrong total or a payment that failed quietly, the agent has nothing to read. Full comparison: Shipbook vs Firebase Crashlytics.

Also Worth Knowing​

Five more vendors have official MCP servers that did not make the ten. Dynatrace's is GA and lets the agent write and run DQL across Grail, including logs. Honeycomb's is included on every plan and queries events and traces rather than logs. Axiom's runs APL over logs, traces and events and is included in all plans. BugSnag, through SmartBear's MCP server, and Luciq (formerly Instabug) both expose errors and crashes but no log search; Luciq's separate Resolve Agent can open a pull request.

How to Choose​

Start from the last bug that took you too long to find.

If it threw an error, and the stack trace pointed at the line — almost any server here will do, and the cheapest is the one connected to the tool you already use. Firebase Crashlytics and Rollbar are free.

If it threw an error and the stack trace was not enough — the agent needs the logs before it. That is a server from the first group.

If it threw nothing at all — a freeze, a wrong total, payments that fail in one currency, a user who says "it just didn't work" — only a server that opens the logs has anything to show the agent. Error trackers are blind to these bugs.

Then choose within the first group, and here the question is where the bug lives. If it is in your services and infrastructure, a suite shows the agent the logs next to traces and metrics: Sentry, Datadog, New Relic, Grafana, Better Stack. If it is in the app, on a user's phone or in their browser, an app-first tool lets the agent find the logs by the user, the device or the app version they came from: Shipbook, Bugfender, Embrace. How they compare as loggers, beyond their MCP servers, is in The 10 Best Mobile App Logging Tools.

Last, ask who writes the fix. Your own agent in Cursor or Claude Code can fix code with any of these servers. Shipbook, Sentry, Datadog, Better Stack and Rollbar can also read your repository themselves and open a pull request with a proposed fix — at very different prices.

Whatever you pick, connect it before the bug you cannot explain. On that day, the agent can only read what the server shows it.

How I Checked​

I picked the vendors that AI assistants name most often when asked about MCP debugging tools, plus the logging and crash tools mobile teams use. For each one I read the vendor's own MCP docs, pricing page or GitHub repository on December 1, 2026, and nothing from third-party lists. Prices are list prices in US dollars. Where the vendor's pages did not say, I wrote that instead of guessing. I will update this page when the servers or the prices change.

Questions People Ask​

What is an MCP server for debugging? A server that speaks the Model Context Protocol and gives an AI agent — Claude Code, Cursor, Copilot, Codex — tools to read your production data: logs, errors, traces. The agent calls those tools while it works, so it can check what actually happened instead of guessing from the code.

How do I give Cursor or Claude access to my production logs? In Claude, open Settings → Connectors: if your tool is listed — Shipbook is — you search for it, click Connect and log in, with nothing to configure. In other clients, add your logging tool's MCP server: in Cursor, a one-click install or an entry in .cursor/mcp.json. The first time the agent uses it, you log in to the vendor in your browser. No logs are copied anywhere; the agent queries them when it needs them.

What is the best MCP debugging tool for Cursor? Every server on this list documents Cursor setup. Choose by what the agent needs to read: every log from your app's sessions (Shipbook, Bugfender, Embrace), logs plus backend traces and metrics (Sentry, Datadog, New Relic, Grafana, Better Stack), or only crashes and errors (Firebase, Rollbar).

Which tools can open a pull request to fix a logged bug? Shipbook, Sentry (Seer), Datadog (Bits Code), Better Stack (AI SRE), Rollbar (Resolve) and Luciq (Resolve Agent) read your repository and open a pull request with a proposed fix. With any of the others, your own coding agent writes the fix.

Which MCP servers can find the root cause in my source code? The same six. They connect to your GitHub repository and read the code behind an error. Shipbook's analysis gives the file and line, the root cause and a suggested fix for each recurring issue.

Is there a free MCP server for production logs? Yes. Shipbook (100K logs a day, 24-hour retention) and Better Stack include their MCP servers on their free plans, Sentry lists MCP access on its free Developer plan, and Grafana's free tier allows 3 active AI users. Firebase Crashlytics and Rollbar are free too, but they show the agent errors, not logs.

Shipbook is free to start, with up to 100,000 logs a day: create an account, add the SDK, and connect your agent — the next bug report comes with an agent that can read the logs behind it.

· 9 min read
Elisha Sterngold

A checkout screen that says "Code applied" while the discount stays 0,00 €, next to the info log line that explains it

The Bug That Never Crashes: Why Your Crash Reporter Can't See It​

A shopper in Germany opens the checkout. Trail running shoes, a three-pack of socks, 104,00 €. She types the promo code from the newsletter, SPRING10, and taps Apply.

The app answers in green: Code applied.

The discount line says 0,00 €. The total still says 104,00 €.

Nothing crashes. Nothing throws. No error is logged. The promo request came back with a 200. On the developer's phone the same code takes 10.5% off, every time. In QA it takes 10.5% off, every time. The shopper looks at the screen for a moment, decides the shop is a little broken, and closes the app.

We built this checkout as a small demo app, promo-app, to show a class of bug that I think is the most expensive kind a mobile team has: the one where the app is wrong and every tool you own says it is fine.

Three Lines of Correct-Looking Code​

The promo API returns the discount as a JSON string: "10.5". Always with a dot — it is an API, not a person.

The app turns that string into a number like this:

struct DiscountParser {
let locale: Locale

func percent(from raw: String) -> Double? {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
formatter.locale = locale
return formatter.number(from: raw)?.doubleValue
}
}

discountPercent = DiscountParser(locale: .current).percent(from: raw) ?? 0

Read it in a code review and it looks careful. It uses NumberFormatter rather than hand-rolled parsing. It respects the user's locale. It handles the failure case instead of force-unwrapping.

Every one of those virtues is part of the bug.

NumberFormatter with Locale.current parses numbers the way the user writes them. In Germany, France and Italy, people write ten and a half as 10,5. A formatter set to those regions looks at "10.5", does not recognise it as a number, and returns nil. Then ?? 0 does exactly what it was written to do: it turns "I could not read this" into a perfectly plausible value. Zero percent. A discount of nothing, applied successfully.

There is one more twist, and it is the one that slips past people who do think about locales. The app is English-only. On a German phone, iOS runs it in English, so Locale.current is not de_DE — it is en_DE. English language, German region. Nothing on the screen looks German. A test plan that says "check it on a German phone" sounds like it covers this, but whether the bug appears depends on the region setting, not the language, and the app looks identical either way. en_DE takes its decimal separator from the region, and the region writes a comma. A real German user's phone looks exactly like this, and it is the combination almost nobody on the team is running.

Why Nobody's Tools Saw It​

It is worth going through the usual safety nets one by one, because each of them is working correctly. That is the uncomfortable part.

Crash reporters are built to fire on crashes and errors. There was neither. A nil that was handled is not an exception; a fallback to zero is not a crash. From the crash reporter's point of view this was a healthy session, and it is right.

Breadcrumbs and attached logs do not save you either, because of where they live. Firebase Crashlytics, for example, associates custom logs with your crash data and shows them in the Logs tab of an issue; its breadcrumbs describe what the user did leading up to a crash, non-fatal, or ANR event. Sentry describes its breadcrumbs as a trail of events that happened prior to an issue, shown on that issue's page. That is a sensible design for what those tools are for. But it means the context is filed under an error. When there is no error, there is no issue to open, and no trail to read. (Sentry has since added a separate Logs product that sends log lines whether or not an error follows — which, as you will see, is the point.)

APM and backend monitoring see a fast, successful request. The promo endpoint answered with the right payload. The bug happens after the bytes arrive, on the phone, in a branch that does not call anything.

QA and the developers run English phones set to English-speaking regions, or a simulator left on its defaults. The bug needs a region that writes a comma. It is perfectly reproducible — every time, on every such phone — and nobody in the building owns one configured that way.

And the user does not report it. This is the part I find hardest to accept. A crash feels like the app's fault, and people complain about it. A missing discount feels like fine print. Maybe the code expired. Maybe it does not apply to shoes. Most people do not open a support ticket over 10,92 €. They close the app, and the only signal you ever get is a conversion rate in Germany that is a little lower than it should be, for reasons nobody can name.

So the bug sits in production, fully reproducible, in front of a large share of your European users, and every dashboard is green.

The One Line That Was There​

Here is what saves this story. Next to the parsing code, the developer had written an ordinary info log — not an error, not a warning, just a record of what the checkout decided:

log.i("Promo \(code) applied: discount=\"\(raw)\" percent=\(discountPercent) total=\(total) locale=\(Locale.current.identifier)")

On the German shopper's phone it reads:

Promo SPRING10 applied: discount="10.5" percent=0.0 total=104.0 locale=en_DE

That line contains the whole bug. The raw input, "10.5". The parsed result, 0.0. The consequence, a total of 104.0. And the reason, en_DE. Nobody needs to reproduce anything. You read it and you know.

The debugging session in Shipbook is short. A shopper — or a support agent, or a sales colleague in Munich — says "the code didn't work for me". You search the logs for that user, open their session, and read the checkout lines in order until you reach the one above. Then you take the interesting part of that line and search all the logs for it: percent=0.0. The results come back with a count over time and a list of sessions, and every one of them has a locale whose region writes decimals with a comma — en_DE, en_FR, en_IT. An en_US session with the same code says percent=10.5.

In two searches you have gone from "one person says it didn't work" to "every user in a comma-decimal country gets no discount, and here is how many there were since the release".

Here is that debugging session in the demo app:

That second search is the part I care about most. A single user's report is an anecdote. The same line across every session is a measurement — of who is affected, since when, and whether the fix worked once it ships.

You don't even have to run the searches yourself. With the Shipbook MCP server connected to Claude, Cursor or another AI assistant, you can paste the report in as it came — "user anna.weber says the code SPRING10 didn't work" — and ask what happened. The assistant pulls that user's session, finds the percent=0.0 line, searches every session for the same value, and comes back with the same answer: comma-decimal regions, and how many users. Because it works next to your code, it can also point at DiscountParser(locale: .current) as the line to change.

The Fix Is One Line​

Data from an API is not text a human typed. It has a fixed format, and it should be parsed with a fixed locale:

DiscountParser(locale: Locale(identifier: "en_US_POSIX"))

Or, for a plain decimal string, Double("10.5"), which does not look at the locale at all. NumberFormatter with the user's locale is the right tool for a number the user typed into a text field. It is the wrong tool for a number a server wrote.

The demo's tests, PromoAppTests, show both sides of the bug: "10.5" parses to 10.5 under en_US, and to nil under de_DE, fr_FR and it_IT. Those tests are easy to write once you know. Before you know, nobody thinks to write them, which is the whole problem with this class of bug.

The ?? 0 deserves its own paragraph. A silent fallback turned a parsing failure into a believable number. Had the nil been logged as an error, the bug would have been in front of someone on the first day. The info line still found it — but it is worth asking, every time you write ?? 0, whether zero is a real answer or a way to stop thinking about the problem.

Log the Decisions, Not Just the Failures​

Most of us were taught to log errors. Something went wrong, write it down. That habit is fine, and it covers the bugs that know they are bugs.

The bug in this checkout did not know. Every function returned. Every branch was taken on purpose. The app believed, sincerely, that it had applied a discount. The only place the truth existed was in the gap between what the API sent and what the app computed — and the only way to see that gap was a line that wrote both down.

So the habit I would add is this: log the decisions your app makes from outside data. Where a server's value becomes your number, write down the raw value, the result, and the context that shaped it — locale, time zone, app version, feature flag. It costs one line. Most days nobody reads it. On the day a shopper in Germany says "the code didn't work", it is the only witness you have.

Crash reporters will tell you when your app falls over. Nothing tells you when it quietly does the wrong thing — except the logs you decided to keep when everything looked fine.

Shipbook is free to start, with up to 100,000 logs a day: create an account, add the SDK, and the next "it didn't work for me" comes with the session that shows why.

· 12 min read
Elisha Sterngold

React Native console calls forking into Android's Logcat and iOS's unified log, where the last log lines crumble away, while a Shipbook logger's lines travel on their own line to the cloud by remote logging

React Native Logging: console.log, LogBox, Native Logs, JS Errors and Remote Logging​

In React Native, console.log looks exactly like it does in a browser. That's the trap.

Your JavaScript runs in one thread, but every line it logs ends up in a native log: Logcat on Android, the unified log on iOS. Where you read it has moved twice since 2024: Flipper left React Native, and then the Metro terminal stopped showing logs. And in a release build, a whole class of errors disappears without leaving a line anywhere: an unhandled promise rejection that showed a red LogBox error on your desk does nothing at all on your users' phones.

This guide covers where React Native logs go in development, where they go on the device, what happens to them in release builds, how to catch JavaScript errors, and how to get the logs from your users' phones.

console.log in Development: DevTools, Metro and Where Flipper Went​

The console methods are all there — log, info, warn, error, debug, plus table and group:

console.log('Rendering cart', items.length);
console.info('Order submitted', orderId);
console.warn('Payment retry', attempt + 1, 'of 3');
console.error('Payment failed', error);

For years these lines showed up in the terminal running Metro. They don't anymore. React Native 0.76 deprecated log forwarding through Metro and 0.77 removed it, so a current React Native CLI project prints nothing there. Expo is the exception: Expo CLI still streams logs to its terminal.

The place to read them now is React Native DevTools, the built-in debugger. Press j in the Metro terminal, or choose Open DevTools from the Dev Menu (shake the device, or Ctrl+Cmd+Z on the iOS Simulator, Cmd+M on an Android emulator). Its Console panel filters by level and text and lets you expand objects, as in a browser. And since Hermes buffers console calls in the background, the lines written before you opened DevTools are there too.

And Flipper? React Native 0.73 deprecated its built-in Flipper integration, and 0.74 removed it from new projects. Flipper still exists as a standalone tool for native apps, but the React Native team's advice is to use the native tooling in Android Studio and Xcode instead — which turns out to be good advice for logging, as we'll see below.

LogBox: Warnings and Errors on the Screen​

Some lines don't wait for you to open a console. LogBox puts them on the screen of the app itself, in debug builds.

console.warn shows a yellow notification at the bottom of the screen. console.error shows a red one with a count; tap it to see the message, the stack trace and the other errors. A fatal error — a syntax error, an exception nothing caught — opens LogBox full screen, and it can't be dismissed until the code is fixed.

You can silence the noise you can't fix, such as a warning from a third-party library:

import { LogBox } from 'react-native';

LogBox.ignoreLogs([
'Warning: componentWillReceiveProps has been renamed',
/GraphQL error: .*/,
]);

LogBox.ignoreAllLogs() hides everything, which is useful for a demo and dangerous the rest of the time. Note what these do, though: they hide the notification, not the line, which still goes to DevTools and to the native log.

LogBox, the Dev Menu and DevTools are all disabled in release builds. On your users' phones, a warning is just a line in a log.

Where console.log Really Goes: Logcat and Xcode​

Under the hood, React Native's console hands every line to native code, in debug and release builds alike.

On Android, each line becomes a Logcat line with the tag ReactNativeJS, at Info for console.log, Warning for console.warn and Error for console.error. React Native's own native code logs under the tag ReactNative. So with the phone connected:

# Only React Native's lines: your JavaScript and the framework
adb logcat "ReactNativeJS:V ReactNative:V *:S"

# Dump what's in the buffers to a file and exit
adb logcat -d > android-log.txt

In Android Studio's Logcat, package:mine tag:ReactNativeJS does the same.

On iOS, each line goes to the unified log under the subsystem com.facebook.react.log, category javascript. When you run from Xcode, the lines show in its console. With a device connected, open the Console app on your Mac, select the device, and search for subsystem:com.facebook.react.log. One catch: console.log and console.warn are written at the unified log's Info level, which Console hides until you turn on Action › Include Info Messages. For the Simulator, from the terminal:

xcrun simctl spawn booted log stream --level info --predicate 'subsystem == "com.facebook.react.log"'

The native logs are also where your native modules write — a Kotlin Log.d or a Swift Logger call sits right next to the JavaScript lines, in order. When a bug crosses the bridge between the two, that's the only place you see both sides. Everything about these tools — Logcat filters, adb bugreport, the log buffers, unified logging and Console.app — works the same for a React Native app; I covered them in Android Logging in Kotlin and iOS Logging in Swift.

What they have in common is that you need the phone, connected to your computer.

console.log in Release Builds​

console.log doesn't know about build types. In a release build every call still runs, still formats its arguments on the JavaScript thread, and still writes to Logcat or the unified log — where nobody reads it, except anyone with adb and your app on their phone.

The React Native docs warn that console calls can be a big bottleneck on the JavaScript thread in a bundled app, and recommend babel-plugin-transform-remove-console to remove them from production builds. Install it, then turn it on for production in your Babel config — .babelrc here; babel.config.js takes the same env key:

npm install --save-dev babel-plugin-transform-remove-console
{
"env": {
"production": {
"plugins": ["transform-remove-console"]
}
}
}

For a single line, the global __DEV__ does the same job by hand: it's true in a debug build and false in a release build, so the minifier drops the whole block:

if (__DEV__) {
console.log('Cart', JSON.stringify(cart));
}

Notice what this does, though — the same thing R8 does for Log.d on Android: the release build is quieter, so the lines that would explain a production bug don't exist anywhere. That's the right trade only while nobody can read them.

react-native-logs: Levels, Namespaces and Transports​

console has no real levels you can turn down and no notion of where a line came from. Most React Native apps that take logging seriously use a library, and react-native-logs is the common one:

import { logger, consoleTransport } from 'react-native-logs';

const log = logger.createLogger({
severity: __DEV__ ? 'debug' : 'warn',
transport: consoleTransport,
async: true,
});

const checkoutLog = log.extend('checkout');

checkoutLog.debug('Applying coupon', code);
checkoutLog.error('Payment failed', error);

severity is the lowest level that gets written; extend creates a namespaced logger, and enabledExtensions lets you turn on only the namespaces you're debugging. async: true moves the work off the call, so a log line doesn't block rendering.

What makes it more than a prettier console.log is the transport: the function that decides where each line goes. If you've used Timber on Android, it plays the role of the trees. consoleTransport and mapConsoleTransport write to the console, fileAsyncTransport appends to a file with react-native-fs or expo-file-system, and there are transports for Sentry and Crashlytics. You can write your own — it's a function that receives the message, its level and its namespace — and pass several as an array.

A log file is a step forward: it survives restarts and doesn't scroll away. But it's still on the user's phone. You've moved the problem from a ring buffer to a folder.

JavaScript Errors: ErrorUtils and Unhandled Promise Rejections​

The most important lines in a React Native app are the ones you didn't write: the errors.

An exception that nothing catches in an event handler, a timer or a callback goes to the global handler in ErrorUtils, a global React Native sets up. In a debug build that handler shows LogBox. In a release build, a fatal error goes to the native side, which crashes the app. To do something with these errors, wrap the handler — and call the original, or you lose LogBox in debug and the crash in release:

const defaultHandler = ErrorUtils.getGlobalHandler();

ErrorUtils.setGlobalHandler((error, isFatal) => {
report(error, isFatal);
defaultHandler(error, isFatal);
});

An error thrown while React renders takes another route. React looks for an error boundary above the component that threw. If there is none, it unmounts the whole app and hands the error to React Native as fatal — LogBox in debug, a crash in release — without passing through ErrorUtils. Your handler never sees it. An error boundary is the place to catch these, and to report them:

class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { failed: boolean }> {
state = { failed: false };

static getDerivedStateFromError() {
return { failed: true };
}

componentDidCatch(error: Error, info: React.ErrorInfo) {
report(error, info.componentStack);
}

render() {
return this.state.failed ? <SomethingWentWrong /> : this.props.children;
}
}

Promises are a third story, and the one that surprises people most. Write this:

useEffect(() => {
loadCart(); // a promise nobody awaits and nobody catches
}, []);

If loadCart rejects in a debug build, LogBox shows a red error that starts with Uncaught (in promise. In a release build, nothing happens at all. React Native turns on promise rejection tracking only when __DEV__ is true — for Hermes and for the JavaScript Promise polyfill alike — and even in a debug build the rejection goes straight to React Native's exception manager, which shows LogBox, without passing through ErrorUtils. So a handler you set on ErrorUtils never sees it.

The fix is not a handler. It's to never leave a rejection unhandled — catch it where you await it, and log it there, with the error:

async function onCheckout() {
try {
await payments.charge(order);
} catch (error) {
log.e('Payment failed', error);
showPaymentError();
}
}

And report is still the question. Logging the error again puts it in the same log nobody reads.

Is there a remote logging library for React Native that uploads logs to the cloud?​

Yes. Remote logging changes the trade above: an SDK in your app collects the log lines and errors and uploads them, so you can read a user's session after they report a bug — on a phone you've never touched. Those logs are worth keeping in release builds, at every level.

Full disclosure: I'm the founder of Shipbook, so here's how it works with ours. Install @shipbook/react-native and the storage package it uses:

npm install @shipbook/react-native @react-native-async-storage/async-storage

In an Expo project, use npx expo install with the same two packages. Start Shipbook once, when the app starts:

import Shipbook from '@shipbook/react-native';

Shipbook.start('YOUR_APP_ID', 'YOUR_APP_KEY');

Then log through a Shipbook logger, one per screen or module:

const log = Shipbook.getLogger('CheckoutScreen');

log.i('Order submitted', orderId);
log.w('Payment retry', attempt + 1, 'of 3');

try {
await payments.charge(order);
} catch (error) {
log.e('Payment failed', error);
}

The extra arguments work like console.log's; when the last one is an Error, Shipbook keeps its stack trace. The lines still show in DevTools and the native logs while you develop — log.e even shows in LogBox, like console.error — and they're also uploaded and grouped by user and session in the Shipbook console. They aren't console calls, so transform-remove-console leaves them in your release build.

You don't need to write the ErrorUtils handler above, or the report call in the error boundary. Since version 2.0.1, Shipbook hooks both routes itself: the global handler, and the exception manager that render errors and promise rejections go to. It records an uncaught error, a render error (with its component stack) and an unhandled promise rejection, each with its stack trace and the log lines that led up to it. Rejections are recorded in release builds too: there, Shipbook turns on the Hermes rejection tracking that React Native leaves off. After recording an error, it passes it on to React Native, so LogBox and any other crash reporter still get it. Keep the error boundary for its fallback screen, and keep the catch around each await. Shipbook recording a rejection doesn't mean anything handled it.

Three more lines connect the session to the rest of your system. Shipbook.registerUser(userId) ties it to the user who reported the bug. Shipbook.screen('Checkout'), called when the route changes — React Navigation's onStateChange is the usual place — shows which screen each line was written on. And if you add Shipbook.getSessionHeaders() to the requests your app sends to your own backend, the console links the app's session to the backend logs those requests wrote:

await fetch('https://api.example.com/checkout', {
method: 'POST',
headers: { 'Content-Type': 'application/json', ...Shipbook.getSessionHeaders() },
body: JSON.stringify(cart),
});

You still decide what's sent, in the Shipbook console and without shipping a new build — see the configuration guide. React Native remote logging with Shipbook shows what the console looks like, and the React Native integration docs cover the full API.

Where Each React Native Log Line Ends Up​

Every React Native log line lands in one of five places. In React Native DevTools, if a debugger was open — or opened later, thanks to Hermes's buffer. On the screen, in LogBox, if it was a warning or an error in a debug build. In Logcat or the unified log of the phone it ran on, readable by adb, Xcode or Console.app until newer lines push it out. Nowhere, if a Babel plugin or __DEV__ stripped it, or if it was a promise rejection in a release build. Or on a server, where you can read it next week for the one user whose checkout broke.

The first four come with React Native, and you should know all of them. Only the fifth helps with the bug you can't reproduce on your own phone.

Shipbook is free to start, with up to 100,000 logs a day: create an account, add @shipbook/react-native, and the next bug report from a user comes with the logs from their phone.

· 10 min read
Elisha Sterngold

A Flutter app on an Android phone, an iPhone, a browser and a desktop, each with its own log (Logcat, the unified log, the browser console, stdout) whose lines crumble away; one line from every device joins a single route to the Shipbook console, which lists each device&#39;s session with its logs and an error&#39;s stack trace

Flutter Logging: print, debugPrint, dart:developer, Error Handlers and Remote Logging​

Flutter gives you one codebase for Android, iOS, the web and the desktop, and logging is where that promise gets thin.

At your desk, print works and the line shows up in the terminal. In production, every Dart log line ends up wherever the platform puts it — Logcat on Android, the unified log on iOS, the browser's console on the web, and standard output on macOS, Windows and Linux, where nobody sees it once the app is installed. And Flutter adds a few traps of its own: one popular logging package logs nothing at all in a release build, and an error thrown during build shows your user a gray box while the explanation goes to a log on their device that nobody will read.

This guide covers every way to write a log in Flutter, where each one goes, how to catch the errors Flutter swallows, what happens in release builds, and how to get the logs from your users' devices.

Flutter has three built-in ways to write a log line, and they don't go to the same place.

import 'dart:developer' as developer;
import 'package:flutter/foundation.dart';

print('Applying coupon $code');
debugPrint('Order $orderId submitted');
developer.log(
'Payment failed',
name: 'checkout',
level: 1000, // SEVERE in package:logging's scale
error: error,
stackTrace: stack,
);

print comes from dart:core. The line shows in the flutter run terminal and your IDE, and it's written to the platform's log: a Logcat line with the tag flutter on Android, the unified log on iOS, the browser console on the web, and the process's standard output on macOS, Windows and Linux. Flutter's default lints flag it (avoid_print), for a reason we'll get to.

debugPrint comes from Flutter's foundation library. By default it throttles its output, because Android rate-limits logging and drops lines when an app writes too many at once. A long JSON response or a big stack trace printed with print can lose its middle; with debugPrint it arrives whole. You can also pass wrapWidth to wrap long lines.

log from dart:developer is the structured one. It takes a name (the source, like a tag), a numeric level, an error and a stackTrace, and it sends them to the debugger — DevTools' Logging view, where you can filter by name and expand the error. It doesn't go to Logcat or to flutter logs, and a release build has no debugger to receive it. On the web, a debug build sends it to the browser console with console.debug, and in a release build log does nothing at all. It's an excellent tool while you develop, and it's invisible everywhere else.

Logging Packages: logger and logging​

Most Flutter apps don't stop at print. Two packages cover most of the rest, and each has a default worth knowing.

logger prints pretty, colored, boxed output with levels from trace to fatal:

import 'package:logger/logger.dart';

final logger = Logger();

logger.d('Applying coupon $code');
logger.e('Payment failed', error: error, stackTrace: stack);

Here's the default worth knowing: Logger() uses a DevelopmentFilter, which only logs while asserts run — that is, in debug builds. In release mode it omits every log. That's a sensible choice for console output, and a surprise the day you go looking for a production log that was never written. Pass filter: ProductionFilter() if you want release builds to log.

logging is the Dart team's package. It gives you named, hierarchical loggers with levels from FINEST to SHOUT, and it doesn't print anything by itself. Every record goes to a stream, and you decide where it goes:

import 'package:logging/logging.dart';

final _log = Logger('CheckoutPage');

void main() {
Logger.root.level = Level.ALL; // the default is INFO
Logger.root.onRecord.listen((record) {
debugPrint('${record.level.name} ${record.loggerName}: ${record.message}');
});
runApp(const ShopApp());
}

// Anywhere in the app
_log.info('Order $orderId submitted');
_log.warning('Payment retry ${attempt + 1} of 3', error, stack);

If you've used Timber on Android, onRecord plays the role of its trees: your code only ever calls _log, and where lines go is decided in one place. Forget the listener and the records go nowhere.

Errors Flutter Catches — and the Ones It Doesn't​

The most important lines in a Flutter app are the ones you didn't write: the errors. Flutter routes them through two handlers, and by default both of them only print.

FlutterError.onError receives the errors Flutter catches itself — in build, layout, paint, and gesture callbacks. Its default dumps the error to the device log. When the error happens during build, Flutter replaces the broken widget using ErrorWidget.builder: the red error screen in debug mode, and a gray box in release mode. The user sees part of the screen go gray; the stack trace is in a log on their device.

PlatformDispatcher.instance.onError receives the errors that happen outside Flutter's callbacks — an await that throws with no try around it, a failed platform channel call. By default it only prints them.

To do anything with these errors, set both handlers before runApp:

import 'dart:ui';
import 'package:flutter/material.dart';

void main() {
FlutterError.onError = (details) {
FlutterError.presentError(details); // keep printing it to the console
report(details.exception, details.stack);
};
PlatformDispatcher.instance.onError = (error, stack) {
report(error, stack);
return true; // handled
};
runApp(const ShopApp());
}

Note the dart:ui import — PlatformDispatcher isn't exported by material.dart. And report is the question: printing it again puts it in the same log nobody reads.

Reading Logs from a Device​

When the app runs on a connected device, flutter logs shows the output of print and debugPrint without starting a debug session — useful on a tester's phone or when the app was launched by something else.

Below Flutter, the platform tools still work. On Android, Flutter's lines are Logcat lines with the tag flutter:

# Only Flutter's lines
adb logcat -s flutter

# Dump what's in the buffers to a file and exit
adb logcat -d > android-log.txt

On iOS, the app's output is in Xcode's console when you run from Xcode, and in the Console app on a Mac with the device connected. Everything about those tools — Logcat filters, adb bugreport, the log buffers, unified logging — works the same for a Flutter app; I covered them in Android Logging in Kotlin and iOS Logging in Swift.

On the web, print and debugPrint lines are in the browser's DevTools console, and in a debug build developer.log calls show there too, at the Verbose level. That's your browser, or a user's if you can talk them through opening DevTools.

On the desktop, the engine writes these lines to standard output. On macOS that's the terminal you started the app from — unlike iOS, nothing goes to the unified log, so the Console app shows none of it. On Windows, the runner Flutter generates attaches a console only when the app was started from one or under a debugger; started from the Start menu, the lines go nowhere. On Linux, they go wherever the desktop sends a launched app's output, on many distributions the systemd journal.

What these tools have in common is that you're there: a phone you can plug in, a browser you can open DevTools in, a terminal you started the app from.

Logging in Release Builds​

print and debugPrint both still run in a release build. They cost time on every user's device, and anyone with adb on Android, or with DevTools on the web, can read them — which is why avoid_print exists. Flutter's answer is kDebugMode and kReleaseMode, compile-time constants from foundation:

if (kDebugMode) {
debugPrint('Cart: ${items.join(', ')}');
}

Because kDebugMode is a constant, the compiler removes the whole block from a release build, string and all. debugPrint is also a variable, so you can silence it in one place at startup:

if (kReleaseMode) {
debugPrint = (String? message, {int? wrapWidth}) {};
}

Notice what this does, though — the same thing R8 does on Android: the release build is quieter, so the lines that would explain a production bug don't exist anywhere. That's the right trade only while nobody can read them.

Flutter Remote Logging: a Package That Sends Logs to a Server​

Remote logging changes that trade. An SDK in your app collects the log lines and errors and uploads them, so you can read a user's session after they report a bug — on a device you've never touched. Those logs are worth keeping in release builds, at every level.

Full disclosure: I'm the founder of Shipbook, so here's how it works with ours. It runs on every platform Flutter builds for: Android, iOS, the web, macOS, Windows and Linux. Add shipbook_flutter to pubspec.yaml:

dependencies:
shipbook_flutter: ^2.1.0

Start it once in main:

import 'package:shipbook_flutter/shipbook_flutter.dart';

void main() {
runApp(const ShopApp());
Shipbook.start('YOUR_APP_ID', 'YOUR_APP_KEY');
}

Then log through a Shipbook logger, one per class or screen:

final log = Shipbook.getLogger('CheckoutPage');

log.i('Order $orderId submitted');
log.w('Payment retry ${attempt + 1} of 3');

try {
await payments.charge(order);
} catch (error, stackTrace) {
log.e('Payment failed', error, stackTrace);
}

Pass the caught error and its stack trace to log.e, and the console shows the line where the error was thrown, not the line that logged it. The lines still show in the console while you develop, and they're also uploaded and grouped by user and session in the Shipbook console. You don't need to write the error handlers above: Shipbook sets FlutterError.onError and PlatformDispatcher.instance.onError itself, with the stack trace and the log lines that led up to the error. If you've set your own handlers before it starts — for another crash reporter, say — Shipbook calls them too.

Two more lines connect the session to the rest of your system. Shipbook.registerUser(userId) ties it to the user who reported the bug. And if you add Shipbook.getSessionHeaders() to the requests your app makes to your own backend, the console links the app's session to the backend sessions those requests created:

await http.post(
Uri.parse('https://api.example.com/checkout'),
headers: {'Content-Type': 'application/json', ...Shipbook.getSessionHeaders()},
body: jsonEncode(cart),
);

You still decide what's sent, in the Shipbook console and without shipping a new build — see the configuration guide. Flutter remote logging with Shipbook shows what the console looks like, and the Flutter integration docs cover the full API.

Where Each Flutter Log Line Ends Up​

Every Flutter log line lands in one of five places. In DevTools, if you used dart:developer and a debugger was attached. In the terminal and the platform log of the device it ran on, if you used print or debugPrint — readable by flutter logs, adb, Xcode or the browser's DevTools, until newer lines push it out, and lost on a desktop app started from its icon. Nowhere, if it was a logger call in a release build, or a block behind kDebugMode. In a gray box, if it was an error during build. Or on a server, where you can read it next week for the one user whose checkout broke.

The first four come with Flutter or a package, and you should know all of them. Only the fifth helps with the bug you can't reproduce on your own device.

Shipbook is free to start, with up to 100,000 logs a day: create an account, add shipbook_flutter, and the next bug report from a user comes with the logs from their device.

· 10 min read
Elisha Sterngold

A ring of Android log lines around a phone: new lines are written at the top, the oldest crumble away as they are overwritten, and one error line travels to the cloud by remote logging

Android Logging in Kotlin: Logcat, Log Levels, Device Logs and Remote Logging​

On your desk, Android logging feels solved. You call Log.d, the line shows up in Logcat, and you move on.

Then a user reports a bug you can't reproduce, and you find out what Android logging actually is: a set of ring buffers inside one phone. They're small, they overwrite themselves, and since Android 4.1 no other app on that phone may read your app's lines. The log that explains the bug exists. It's just in the one place you can't reach.

This guide covers every place Android logs live: writing them, filtering them in Android Studio, pulling them off a device, the system and event buffers, what to do in release builds, and how to get them from your users' phones.

Writing Logs: the Log Class and Its Levels​

Everything starts with android.util.Log. Each call takes a tag — a short string that says where the line came from — and a message:

private const val TAG = "CheckoutViewModel"

Log.v(TAG, "Recomposing cart, ${items.size} items") // Verbose
Log.d(TAG, "Applying coupon $code") // Debug
Log.i(TAG, "Order $orderId submitted") // Info
Log.w(TAG, "Payment retry ${attempt + 1} of 3") // Warning
Log.e(TAG, "Payment failed", exception) // Error, with the stack trace
Log.wtf(TAG, "Cart total is negative: $total") // "What a Terrible Failure"

From least to most severe, the levels are Verbose, Debug, Info, Warning and Error, plus wtf for conditions that should never happen. Passing a Throwable as the last argument prints its full stack trace under the message, which is almost always what you want in a catch block.

One detail is easy to miss: every log call costs something, even when no one reads it. In this line, Kotlin first builds the whole message — it walks the cart and joins every item into one string — and only then calls Log.d:

Log.d(TAG, "Cart: ${cart.items.joinToString()}")

That work runs on every user's phone, in every build. If your logs only go to Logcat, no one will ever read a debug line from a user's phone, and the section on release builds below shows how to remove these calls before you ship.

Choosing the right level is a topic of its own. I wrote about it in Android Log Levels.

Logcat in Android Studio​

Logcat (View › Tool Windows › Logcat) shows the log of the connected device or emulator. That log holds Android's own lines and every other app's too, so Logcat starts with the filter package:mine: only the lines of the apps in your open project.

The filter field takes these keys:

KeyShowsExample
package:Lines from an app (mine = your project's apps)package:mine
tag:Lines with a tagtag:CheckoutViewModel
level:Lines at a level and abovelevel:WARN
message:Lines whose message contains a textmessage:order
process:Lines from a processprocess:com.example.shop
is:Crashes, or anything that looks like a stack traceis:crash, is:stacktrace
age:Lines from the last seconds, minutes, hours or daysage:5m

Put several keys in the field to combine them: package:mine level:WARN. A - before a key excludes (-tag:OkHttp), and a ~ after it takes a regular expression (tag~:Checkout.*).

Reading Logs from a Device with adb​

Android Studio isn't always there — on a CI machine, on a tester's laptop, or when the device belongs to someone else. The same logs are one adb command away once USB debugging is on:

# Only your app's lines (Android 7.0+)
adb logcat --pid=$(adb shell pidof -s com.example.shop)

# Only the tags you care about; *:S silences everything else
adb logcat "CheckoutViewModel:D OkHttp:I *:S"

# Warnings and errors from everything
adb logcat "*:W"

# Dump what's in the buffers to a file and exit
adb logcat -d > android-log.txt

# Clear the buffers before reproducing a bug
adb logcat -c

Quote the filter specs: * means something to zsh and bash. The default output format, threadtime, already includes the date, time, process and thread IDs; -v changes it (-v time, -v color, -v UTC).

When a tester reports a bug, ask for a bug report, not a screenshot. adb bugreport bugreport.zip collects the logs of all buffers, system dumps and recent ANR traces into one zip, and so does Developer options › Take bug report on the phone itself, which can share the file without a computer. It's a heavy file, but it's the closest thing Android has to a black box.

System Logs, Event Logs and the Other Buffers​

Logcat isn't one log. The logd daemon keeps several ring buffers, and adb logcat reads the main, system and crash buffers by default:

BufferWhat's in itRead it with
mainApp logs, including your Log callsadb logcat -b main
systemMessages from the Android OSadb logcat -b system
crashCrash logsadb logcat -b crash
eventsBinary system events, decoded for displayadb logcat -b events
radioRadio and telephonyadb logcat -b radio
allEverythingadb logcat -b all

The event log is the one people search for and rarely find. It records system events such as activities starting, processes dying and the battery level changing, in a compact binary format. When you need to know what the OS did to your app — killed it in the background, restarted it — adb logcat -b events is often faster than reading the system log.

What you can't do is read any of this from inside a normal app. Since Android 4.1 (Jelly Bean), the READ_LOGS permission is reserved for system apps, so an app can only read its own lines. The system log, the event log and other apps' lines are visible to adb and to the OS. That's good for privacy. For debugging production it means that the device's own logs are useless to you unless the user plugs the phone into your computer.

Writing your own log file doesn't change that picture. A file in your app's storage survives restarts and overflowing buffers, but it's still on the user's phone. You've moved the problem from a ring buffer to a folder.

Logging in Release Builds with R8​

Log doesn't know about build types: a Log.v in your release APK still runs on every user's phone and writes to a Logcat that nobody reads. If your logs only go to Logcat, have R8 delete them at build time. Add this to proguard-rules.pro:

-assumenosideeffects class android.util.Log {
public static int v(...);
public static int d(...);
}

R8 then removes every Log.v and Log.d from the release build, together with the strings they would have built. It only works when R8 optimizes — with proguard-android-optimize.txt in your proguardFiles — so check the release APK once to be sure.

Notice what that does, though: the release build is quieter, so the lines that would explain a production bug don't exist anywhere. That's the right trade only while nobody can read them.

Timber: Deciding Where Each Log Goes​

Timber is a small open-source logging library by Jake Wharton, and one of the most used in Android apps. You call it instead of Log — Timber.d(...) instead of Log.d(TAG, ...) — and it fills in the tag for you from the class that logged.

What Timber adds is a choice of where the lines go. At startup you "plant" trees: each tree receives every line and decides what to do with it — write it to Logcat, send it somewhere, or drop it. Your code only ever calls Timber, so you change where logs go in one place instead of at every call. A common setup plants Timber's DebugTree, which writes to Logcat, only in debug builds:

class ShopApp : Application() {
override fun onCreate() {
super.onCreate()
if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
}
}
}

// Anywhere in the app; the tag is the calling class
Timber.d("Applying coupon %s", code)
Timber.e(exception, "Payment failed")

Planting DebugTree only in debug builds is one way to keep logs out of a release build, but R8 does it more efficiently. A Timber call with no tree still runs, and its message is still built; a call R8 removed isn't in the APK at all.

Android Remote Logging: Logs from Your Users' Phones​

Remote logging changes the picture. An SDK in your app collects the log lines it writes and uploads them, so you can read a user's session after the fact.

That's why the R8 advice above is only for logs that go to Logcat alone: nobody can read those on a user's phone, so removing them costs nothing. Logs that are uploaded can be read, and when a user reports a bug they are often the only record of what happened. Keep them in release builds — every level, Debug and Verbose included.

To set it up with Shipbook, add the SDK to your module's build.gradle.kts:

implementation("io.shipbook:shipbooksdk:2.+")

Start it in your Application:

import io.shipbook.shipbooksdk.ShipBook

class ShopApp : Application() {
override fun onCreate() {
super.onCreate()
ShipBook.start(this, "YOUR_APP_ID", "YOUR_APP_KEY")
}
}

Then change one import. Shipbook's Log has the same methods as Android's, so the rest of your code stays the same:

import io.shipbook.shipbooksdk.Log   // instead of android.util.Log

Log.e(TAG, "Payment failed", exception)
Log.i(TAG, "Order $orderId submitted")

The lines still show in Logcat while you develop, and they're also uploaded and grouped by user and session in the Shipbook console. If your code already uses Timber, plant a Shipbook tree — the Timber integration is a few lines. Crashes are captured too, with the log lines that led up to them. The R8 rule above names android.util.Log, so it leaves these calls in place.

You still decide what's sent, in the Shipbook console and without shipping a new build — see the configuration guide. Android remote logging with Shipbook shows what the console looks like, and the Android integration docs cover the full API.

Where Each Log Line Ends Up​

Every Android log line lands in one of four places. In Logcat while you develop, where filters make it readable. In a device's ring buffers, where adb and a bug report can reach it until newer lines push it out. Nowhere, in a release build that stripped it. Or on a server, where you can read it next week for the one user whose checkout broke.

The first three are free and built in, and you should master them. Only the fourth one helps with bugs you can't reproduce on your own phone.

Shipbook is free to start, with up to 100,000 logs a day: create an account, add the SDK, and the next bug report from a user comes with the logs from their phone.

· 19 min read
Elisha Sterngold

Ten mobile app logging tools in three groups: tools that keep every log, suites where logs are one module, and tools where logs ride with a crash

The 10 Best Mobile App Logging Tools in 2026, Compared​

Last updated: November 22, 2026.

A support ticket comes in: "The app froze at checkout. I had to force-quit."

You open your crash reporter. Nothing. The app did not crash — it hung, and the user killed it. Whatever the app wrote to its log in those thirty seconds stayed on a phone you will never hold.

That is the problem a mobile logging tool exists to solve, and it is where most "best tools" lists go wrong. They rank crash reporters. A crash reporter answers what broke. A logging tool answers what happened — including on the sessions where nothing broke loudly enough to file a report.

One disclosure before the list: I am the founder of Shipbook, and Shipbook is the first entry. Read that entry knowing who wrote it. For the other nine, I checked every price and limit below on the vendor's own pricing page or docs on November 19, 2026, and each entry says where the tool is the better choice.

The One Question That Splits This List​

Ask each vendor the same thing: if a session has no crash and no error, can I still read its logs tomorrow?

The answers fall into three groups.

Remote loggers keep every line the app writes, crash or no crash. Logs are the product. Shipbook and Bugfender are here.

Observability suites can keep every line too, through a log module that sits next to tracing, metrics and error tracking. You pay by the gigabyte, and the mobile part is one corner of a large product. Sentry, Datadog, New Relic and Embrace are here.

That corner is less specialized for mobile, and it shows when you search. In a suite a log is an attachment — to a trace, an issue, a server — and the log search is a general query language over every log the company has: service, attribute, time range. It can answer almost anything, but you have to know what to ask, and show me what this user's phone did takes more steps than in a tool built around the app's logs. The logs are there. They are harder to find. Embrace is the exception: it was built for mobile, but it caps how many logs a session can send.

Crash and bug reporters keep a bounded slice of logs attached to a crash, an error, or a report a user sent. If nothing was reported, there is nothing to read. Firebase Crashlytics, Luciq, BugSnag and Shake are here.

None of these groups is wrong. They are different tools, and the mistake is buying one from the third group when you needed one from the first.

The Comparison Table​

ToolWhat it isLogs from a session with no crash?Free planPaid from
ShipbookRemote loggerYes, every line100K logs a day, 24-hour retention$50 a month
BugfenderRemote loggerYes, every line100K log lines a day, 24-hour retention$49 a month
SentryError tracker with a Logs productYes, through Sentry Logs5 GB of logs, one user$26 a month
DatadogObservability suiteYes, through Log Management14-day trial$0.10 per GB ingested, plus indexing
New RelicObservability suiteYes, through Mobile Logs (default level: WARN)100 GB a month, one full user$0.40 per GB past the free 100 GB
Embrace (now Cortex XCOR)Mobile observabilityYes, capped per session1M sessions a year$0.80 per 1,000 sessions
Firebase CrashlyticsCrash reporterNoFree at any scaleFree
Luciq (formerly Instabug)Bug and crash reporting, session replayLogs attached to reports and replayed sessionsNone for new sign-upsNot published
BugSnagError and crash monitorNo, breadcrumbs only7.5K events a month, one user$20 a month
ShakeIn-app bug reportingNo, logs attached to a ticket3 seats$200 a month

Every tool on the list has SDKs for iOS, Android, Flutter and React Native, with one exception: Firebase does not list an official React Native SDK for Crashlytics.

1. Shipbook​

Shipbook is built around the log. It collects every line your app writes — from iOS, Android, Flutter, React Native and the browser — and each line carries its user, its device, its app version and its session. So the search is made for the questions a mobile team asks: a user's email or id, a device model, an app version or a range of versions, free text or a regex — picked from autocomplete, with no query language to learn. Every line you send is searchable, and every result opens in the session it came from, to read top to bottom.

What we built on top of it is the reason I think it belongs first. Three things.

It sorts the logs for you. Loglytics groups recurring errors and warnings into issues and ranks them, so you start from "this error hit 400 sessions in the new release" instead of from a search box. Crashes arrive with the session's logs leading up to them.

It follows the user from the phone into the server. If your backend runs Node.js or Python (the Python SDK is in beta), a mobile session and the server requests it made open as one timeline: what the app logged, then each request with its route, status, duration and its own logs. It is one click from either side, with no tracing to set up. You see the phone and the server in one look.

Its AI reads your code, not only your logs. Connect a GitHub repository and each issue arrives with the root cause, the file and line where it happens, and a suggested fix. One click on Create pull request opens that fix as a PR in your repository — nothing is merged until you review it. Logchat lets anyone on the team ask about a set of logs in plain language, and it looks up the source code behind a stack trace before it answers. And an MCP server hands the same classified issues to Claude Code, Cursor and other agents inside your editor.

Best for: mobile teams that want all their logs and want the tool to tell them which ones matter, show what the server did, and propose the fix.

Price: free for 100K logs a day with 24-hour retention, unlimited team members and apps. Paid plans start at $50 a month for 1M logs a day and 7-day retention; $150 a month gets 5M a day and 30 days. See pricing.

Where it falls short: there is no session replay, no performance tracing and no infrastructure monitoring. If you need to watch what the user did, or trace latency across twenty services, this is the wrong tool. The free plan keeps logs for only a day.

2. Bugfender​

Bugfender is the closest thing to Shipbook on this list. It collects everything the app logs, keeps logging while the device is offline, and is organized around the device: find a user, open their device, read its logs. You can switch logging on or off for individual devices remotely.

It covers a wide set of platforms — iOS, Android, Flutter, React Native, several web frameworks, Unity and .NET MAUI. It also has an MCP server that lets an AI coding agent query logs and crashes.

Best for: teams that need remote logging on more platforms than iOS, Android, Flutter, React Native and the web. Bugfender also covers Unity and .NET MAUI, which Shipbook does not.

Price: free for 100K log lines a day with 24-hour retention and up to 2,000 devices. Team is $49 a month for 10M lines a month with 7-day retention; Pro is $99 with 30-day retention. See Bugfender pricing.

Where it falls short: I found no server-side SDK in its docs, so it cannot follow a request into your backend. Its AI story is read-only — an agent can read the logs, but nothing proposes a fix or opens a pull request. Full comparison: Shipbook vs Bugfender.

3. Sentry​

Sentry is an error tracker that has grown into a suite, and since September 2025 that suite includes a real logs product. With a recent SDK you call Sentry.logger and every line goes to Sentry, whether or not an error follows. Logs carry the user's id when you set one, and they link to the errors and traces around them.

Sentry's AI agent, Seer, does root-cause analysis and opens pull requests. It is the most complete fix flow among the big suites.

Best for: teams already on Sentry for errors. Adding logs there costs less effort than adopting a second tool.

Price: the free Developer plan allows one user and includes 5 GB of logs. Team is $26 a month billed annually with unlimited users; additional logs are $0.50 per GB. Seer is an add-on at $40 per active contributor a month. See Sentry pricing.

Where it falls short: Sentry is built around issues and traces, and a log is an attachment to them. You find a log with a query — a user id, an attribute, a time range — and it links to its trace. When there is an error, that works well: you start from the issue. When there is none — a freeze, a wrong total — there is no issue to start from, and you work through a flat list of log lines. I found no way in the docs to open the session a line belongs to. Full comparison: Shipbook vs Sentry.

4. Datadog​

Datadog's mobile SDKs include a Logger API that sends every log to Log Management — by default all of them, not a sample. Logs carry the context of the user's session, so you can go from a session to its logs and on into the backend services the app called. If your servers already report to Datadog, nothing else on this list connects the phone to the infrastructure as completely.

Datadog also has an AI agent that generates code fixes as pull requests, and an MCP server with tools for logs and errors.

Best for: companies already standardized on Datadog, with someone whose job includes watching the bill.

Price: $0.10 per GB ingested, plus $1.70 per million log events indexed for 15 days (annual billing). Session data is a separate meter, from $0.15 per 1,000 sessions. I found a 14-day trial but no free allotment for logs. See Datadog's price list.

Where it falls short: the search is powerful, and it was built for infrastructure. You write queries in Datadog's own syntax — attributes, tags, facets — and plain text looks only in the message and error fields. The view of one user's session lives in RUM, a second product with its own meter. And a log is searchable only if you paid to index it: lines dropped by an exclusion filter, or past the index's daily quota, show up in Live Tail as they arrive and nowhere after. In a tool built around logs, every line you send can be searched — by user, device or app version — with nothing to index first. Full comparison: Shipbook vs Datadog.

5. New Relic​

New Relic's mobile agents have a Mobile Logs feature across iOS, Android, Flutter, React Native and several other frameworks. The logs land in the same Logs screen New Relic uses for servers: you search them with a Lucene-style query, or switch to NRQL, its SQL-like language, and you can chart them, alert on them and group them into patterns. The log level and the share of sessions that log are set remotely from the dashboard.

Best for: teams whose backend is already in New Relic and who want mobile logs in the same place.

Price: the free tier is generous for one person — 100 GB of data a month and one full platform user. Past that it is $0.40 per GB, and additional full users cost $99 each on Standard. See New Relic pricing.

Where it falls short: new mobile apps default to the WARN level, and that default says how New Relic thinks about mobile logs: they are something you collect when there is a problem. Its docs say to raise the level to verbose or debug only for temporary troubleshooting, because of the data it adds — data you pay for by the gigabyte. A remote logger starts from the other end: keep every line, because you do not know yet which one you will need. The search follows the same thinking. It is a server log search with phone logs in it: plain text looks in the message, attribute names are case sensitive, and the query syntax docs list no regex. I could not find a documented way to open one user's session and read just its logs — you filter the list by an attribute and scroll.

6. Embrace (now Cortex XCOR)​

Embrace was the mobile-first observability company, built on OpenTelemetry, and its User Timeline — everything one user did in one session, in order — is one of the better debugging views in the category. This year Palo Alto Networks completed its acquisition of Embrace, and the product's homepage now says Embrace is Cortex XCOR.

Best for: larger mobile teams that want sessions, crashes, network calls and logs in one mobile-specific product.

Price: free up to 1M sessions a year with five users. Pro is $0.80 per 1,000 sessions with an $80 monthly minimum. Error logs are free; other logs are $0.50 per GB. See Embrace pricing.

Where it falls short: it is not built to hold every log line. The iOS SDK docs cap logs per session — 500 errors, 200 warnings, 100 info logs — and advise you to be selective. And a product in the middle of a rename under a security company is a fair thing to ask questions about before you commit.

7. Firebase Crashlytics​

Crashlytics is the default crash reporter for mobile, and it has earned that. It is free at any scale, it is reliable, and it now has AI insights and MCP tools at no cost.

It is not a logging tool, and it does not claim to be. Custom logs are attached to a crash or a non-fatal error, and Crashlytics keeps the last 64 kB of them per session. If the session had no crash, there is no place to read its logs.

Best for: every app, as the crash reporter. Pair it with a logger rather than choosing between them.

Price: free. See Firebase pricing.

Where it falls short: the checkout freeze at the top of this post never shows up here. Firebase also lists no official React Native SDK for Crashlytics. Full comparison: Shipbook vs Firebase Crashlytics.

8. Luciq (formerly Instabug)​

Instabug renamed itself Luciq in 2025. It is mobile-only — iOS, Android, React Native, Flutter — and combines in-app bug reporting, crash reporting, performance monitoring and session replay. Logs travel with each bug or crash report, and Session Replay lets you browse sessions with their logs and the user's steps. Its Resolve Agent drafts a fix and can open a GitHub pull request.

Best for: larger consumer apps that want bug reports from real users, replay and crash data from one mobile specialist.

Price: not published. Luciq says it charges by daily active users and seats, sells Enterprise plans only, and no longer offers self-serve plans to new sign-ups. See Luciq pricing.

Where it falls short: logs are capped — 1,000 log lines per report by default — so it shows the end of the story, not all of it. No free tier, no public price, and no web or backend SDKs. Full comparison: Shipbook vs Luciq.

9. BugSnag​

BugSnag, owned by SmartBear, is an error and crash monitor with good release-health reporting and SDKs for nearly everything. SmartBear announced in 2024 that it would become "Insight Hub"; today its site, docs and pricing page all say BugSnag again.

It does not collect logs. It records breadcrumbs — a short trail of events attached to an error report — 100 by default and 500 at most.

Best for: teams that want stability scores per release and a cheap, predictable error monitor.

Price: free for one user with 7.5K events a month. Paid plans start at $20 a month for 50K events. See BugSnag pricing.

Where it falls short: no error, no breadcrumbs. As a logging tool it is not one. Full comparison: Shipbook vs BugSnag.

10. Shake​

Shake is an in-app bug reporting SDK: a tester or user shakes the phone, and a ticket arrives with a screenshot, device data and the app's recent activity. Console and custom logs are part of that activity history, up to 1,000 entries per ticket. An MCP server and AI debugging are included in every plan.

Best for: QA and beta programs, where a person is there to press "send".

Price: free forever with 3 seats. Premium is $200 a month with 25 seats. See Shake pricing.

Where it falls short: logs exist only inside a ticket. A user who hits a bug and does not report it leaves nothing behind.

How to Choose​

Start from the last bug that took you too long to find.

If it was a crash, and the stack trace was enough — you need a crash reporter, and Crashlytics is free.

If it was a crash and the stack trace was not enough — you needed the logs before it. That is a remote logger, or a suite's log module.

If it was not a crash at all — a freeze, a wrong total, a login loop, a user who says "it just didn't work" — only a tool from the first two groups has anything to show you. These are everyday mobile bugs, and crash reporters are blind to them.

Then choose between those two groups, and here the question is what a log is to the tool. In a suite it is one module next to traces and metrics: you pay by the gigabyte, you decide how much to keep, and you search it the way you search server logs. In a remote logger the log is the product: every line is kept, and you find it by the user, the device or the app version it came from.

Your backend can tip that choice. If its logs already live in Datadog, New Relic or Sentry, having the phone in the same place is a real reason to stay there. If you want the app's session and the server's requests in one timeline without setting up tracing, that is what Shipbook does for Node.js and Python backends.

Last, ask what happens after the logs arrive. Most tools store them and wait for you to search. Some also sort them: Shipbook groups the recurring errors and warnings in your logs into ranked issues, and Sentry, Datadog and Luciq do the same for errors and crashes. Those four can also hand you a pull request with a proposed fix.

Whatever you pick, pick it before the bug you cannot explain. On that day, the only logs you have are the ones you kept.

How I Checked​

I picked tools that appear most often in current "best mobile monitoring" lists, added the two remote loggers those lists leave out, and for each one read the vendor's pricing page and SDK documentation on November 19, 2026, and the log search documentation of Sentry, Datadog and New Relic on November 22. Prices are list prices in US dollars; "from" means the cheapest paid plan. Where a vendor's pages disagreed with each other, or did not say, I left the number out rather than guess. I will update this page when prices change.

Questions People Ask​

What is a mobile app logging tool? An SDK plus a service that sends the logs your app writes on users' devices to the cloud, so you can read what happened in a session you were not there for. It is also called remote logging.

What is the difference between logging and crash reporting? A crash reporter sends a report when the app crashes: a stack trace and a little context. A logging tool sends the app's log lines from every session, crash or not. Most teams end up with both.

Is Firebase Crashlytics enough for logging? For crashes, yes. For logging, no: custom logs are kept only alongside a crash or non-fatal error, limited to 64 kB per session.

What is the best free mobile app logging tool? For full remote logging, Shipbook and Bugfender both have free plans with 100K logs a day and 24-hour retention. New Relic's free tier includes 100 GB a month for one full user. Crashlytics is free without limits, but it is a crash reporter.

Which mobile logging tools work with AI coding agents? Shipbook, Bugfender, Sentry, Datadog, Embrace, Luciq, BugSnag, Shake and Firebase all offer an MCP server, and New Relic offers one on paid plans. They differ in what the agent can do: most let it read data, while Shipbook, Sentry, Datadog and Luciq can also open a pull request with a fix. I compared the MCP servers themselves — what the agent can read and who writes the fix — in The 10 Best MCP Servers for Debugging Production Apps.

Which tools support Flutter and React Native? All ten have Flutter SDKs. All except Firebase Crashlytics list an official React Native SDK.

· 9 min read
Elisha Sterngold

A stack trace, the source code, and the runtime state that connects them

Debugging Is a State Problem, Not a Code Problem​

Show a senior engineer the exact function that threw in production. Give them the stack trace, the file, the line. Watch what happens.

More often than not, they read it, frown, and say some version of: this looks fine.

Because it is fine. That is the part nobody warns you about. The code behind last night's crash or error was almost certainly correct — for every input its author imagined. The bug is not sitting in the source, waiting to be spotted by a careful enough reader. If it were that visible, code review would have caught it and we would all be out of a job.

The bug is somewhere else entirely. And once you see where, a lot of confused arguments about AI and debugging suddenly resolve.

The Function Is Innocent​

Here is the uncomfortable reframe. Most production bugs are not flaws in the logic. They are collisions — between logic that is locally correct and a runtime state its author never pictured.

The array that was "always" non-empty, until the one code path that empties it first. The user object that is "always" populated by the time this runs, until a race lets it through half-built. The config value that is "always" a number, until a migration writes it as a string. In each case the function is doing exactly what it was written to do. It was just written against a reality that turned out to be narrower than the real one.

This is why "I can't reproduce it" is the most hated sentence in engineering. You have the code. You are staring at the code. The code is right there. And it stubbornly refuses to fail, because the thing that makes it fail is not in the code at all. It is the specific, unrepeatable state the code was in when the world handed it something it did not expect.

Debugging, at its core, is not the act of finding the wrong line. It is the act of reconstructing the state that made a right line go wrong. The line is usually the easy part.

Three Layers, and Where the Answer Actually Lives​

When a production error lands, you have — at most — three sources of truth about it. It is worth being precise about what each one can and cannot tell you, because teams routinely stop after the first two and then wonder why the fix is a guess.

The stack trace tells you where it surfaced. That is genuinely useful and genuinely limited. "Surfaced" is not "originated" — the throw is very often downstream of the real cause. A null blows up three frames deep in a formatting helper; the helper is blameless; the null was born in a caller that returned early under a condition the trace does not mention. The stack trace is a pin on a map. It is not the story of how you got to that spot.

The source code tells you what the logic is. This is the layer everyone reaches for, because it is the one that is always available and always feels like progress. But it is the obvious layer. It shows you the machine, not the failure. You can read the machine top to bottom and, as we just established, conclude — correctly — that the machine is fine.

The runtime state — the sequence of logs, events, and values leading up to the moment it broke — tells you the input reality that made correct code fail. This is the layer that actually contains the answer. It is also the one teams have the least of, because it is the hardest to capture. Code is static and sits in a repo forever. State is a fleeting thing that existed for a few milliseconds in production and, unless you deliberately recorded it, is gone.

Notice the asymmetry. The layer that holds the answer is the layer we invest in least. We version-control the machine and throw away the run.

Under-Grounded, Not Unreliable​

Now bring AI into it, because this is where the reframe pays off.

There is a common line that "AI debugging is unreliable." You ask a model to fix a production error, it hands you a confident, well-structured, completely wrong fix, and you conclude the model is not up to the job.

I do not think that is what is happening. I think the model is doing something entirely reasonable given what it was handed.

Give an AI only the stack trace and the source, and ask it why the code failed. It will do the exact thing the senior engineer did at the top of this post — read the machine, find it locally correct — except it cannot stop there, because you asked it for an answer. So it produces the most plausible story consistent with the code. That story is a guess. A fluent, structured, confident guess, because that is what these models are good at. But the state that would have disproven the guess was never in the prompt.

This is the same failure mode as asking any model a factual question it has no source for. It does not say "I lack the data." It reasons forward from what it has and produces something that sounds like an answer. The problem is not the reasoning. The problem is that the fix depends on facts that were never on the table.

So the right word is not unreliable. It is under-grounded. The model was asked to reconstruct a runtime state it was never shown. Of course the answer is a guess. A human handed the same two layers and no way to reproduce would guess too.

Retrieval Isn't Just for Chatbots​

The AI world already has a name for the fix, and it did not come from debugging. It came from chatbots.

When you build a support bot that has to answer "what is our refund policy," you do not rely on whatever the model absorbed in training. You retrieve the actual policy document and put it in front of the model, and only then let it answer. The industry calls this grounding — anchoring the model's reasoning to specific, real facts rather than its priors. It is the difference between a bot that makes up your refund window and one that reads it off the page.

Debugging is the same problem wearing different clothes. The error is the question. The fix is the answer. And the answer is only trustworthy if you ground it in the real facts of the case — which, as we have now said three ways, means both the code and the run.

The code half is the easy, obvious retrieval: pull the source at the offending lines, ideally from the exact branch that is actually in production, not whatever main looks like today. The run half is the one that matters and the one everyone skips: retrieve the log sequence and the session state that led up to the crash or error, so the model can see the input reality instead of inventing one.

Ground a model in both and the character of the answer changes. It is no longer reasoning forward from a machine that looks fine. It is reasoning over the actual collision — this code, meeting this state, producing this failure. That is not a smarter model. It is the same model, finally holding the facts the fix depended on.

The Part You Have to Build​

None of this works if the run is gone.

That is the quiet catch in the whole argument. You can retrieve the code any time — it is versioned, it is durable, it is sitting in Git. But the state that actually caused the bug existed for a moment in production and then evaporated, unless something was there to record it. The reason debugging feels like archaeology is that we treat the run as disposable and the code as sacred, when the run is where the answer lives.

So the practical takeaway is almost boring: capture the run. Log richly enough, and with enough sequence and session context, that when something breaks you can reconstruct the state it broke in — not just the line it broke on. Everything else, human or AI, gets easier downstream of that. The engineer stops guessing. The model stops guessing. The two of them can look at the same reconstructed reality and reason about it together, which is the only version of "AI debugging" I have ever seen actually work.

This is exactly what Shipbook's AI error analysis, Loglytics, does today. You connect your GitHub repository once, and from then on, when Loglytics analyzes an error, it grounds itself in both halves of the collision: it reads the real source behind the trace straight from your repo, and it pairs that with the session's log history leading up to the failure. Code and run, in front of the model together, before it says a word about the fix. That is the whole feature, and it exists precisely because a fix grounded in only one half is a guess. But the tool is not the point. The point is older than any of our products, and it will outlive them: the bug was never really in the code. It was in the state. Debug the state, and the code mostly explains itself.

The next time an AI hands you a confident fix that turns out to be wrong, do not ask whether the model is good enough. Ask what you showed it. Almost always, you showed it the machine and hid the run — and then blamed it for guessing at the part you kept to yourself.

· 9 min read
Elisha Sterngold

Claude querying production logs through the Shipbook MCP

The Bug Hiding in Our Logs That AI Almost Helped Us Miss​

A unit test was timing out on my laptop. The kind of small annoyance you push to next week. I asked Claude to look at it.

A couple of hours later we had a fix. We also had something I did not expect: confirmation that the same bug, in a slightly stricter form, had been firing 1.3 million times a day in production for the past day and a half — silently, in a fire-and-forget error path nobody was watching.

The fix is uninteresting. The way we got there is the part worth writing about.

The Hypothesis That Sounded Small​

While Claude was poking at the local failure, it offered a guess about the production impact. The buggy code path was reached only by a couple of background jobs, it said. Bounded scope. The kind of thing you fix in the next deploy window, not at midnight.

It was a confident answer. Two callers. Job tier. Done. Claude did add a passing line at the end — "worth grepping production logs to confirm" — but it landed the way most footnotes land: as a thing you nod at and move on from. The whole framing pointed away from urgency.

I almost moved on. The fix was ready, the tests were green, and there was nothing in the model's analysis that suggested otherwise. What I did instead — and this is the only thing I want to take credit for in this whole story — was not accept the confident answer. I told Claude to actually check. Pull the production logs. See if the bug was, in fact, contained.

That single sentence is the difference between this story and the much more boring version of it. Claude had given me a tidy diagnosis. The diagnosis was wrong. And the only reason I knew to push back is that I have learned, slowly and at some cost, that "bounded scope" answers from a confident model are exactly where I should be most suspicious. Not because the model is reckless. Because confident reasoning in the absence of data is just well-formed guessing.

So Claude called the Shipbook MCP and pulled a seven-day histogram of the relevant error.

The histogram looked like a wall. Six errors a day. Six. Four. Three. Six. Then a cliff. Then 1.3 million.

A number that high cannot come from a job that runs every five minutes. The original "background jobs only" story was wrong, and it was wrong by an order of magnitude that none of us — engineer or model — would have inferred from the code alone. The cliff also lined up exactly with a constant in our own code that had switched on stricter behavior in our new infrastructure. The story was no longer "small bounded bug." It was "we have been silently breaking writes to a whole cluster since the moment we deployed that constant, and we did not know."

The MCP did not just confirm a hypothesis. It overturned a benign one and replaced it with a real one.

What the Tight Loop Actually Buys You​

I want to be careful about what is new here, because plenty of tools claim some version of "AI debugs production." Most of them are wrong.

What is new is not that an AI can look at logs. It is that the model can stay inside its hypothesis-and-test loop without leaving the conversation. The engineer's job, in that loop, is no longer to fetch data. It is to decide which questions are worth asking. The model handles the rest.

The volume on that histogram did not just upgrade the priority of the bug. It corrected the model. With the number on the table, Claude re-read the code, found a caller it had missed — on the request path of every active session — and revised its picture of the situation. The interesting thing is not that the model corrected itself, but what corrected it. It was not better reasoning. It was a number that did not fit the story. A model that cannot see production will keep telling stories that do not survive contact with it. A model that can see production gets caught when it is wrong, and updates.

This is the loop we are betting on: the model proposes, the data disposes, and both stay in the same conversation while it happens.

Two Bugs for the Price of One​

While we were already inside the data, we noticed something we had not gone looking for. The first bug had been masking a second one. A customer we had recently promoted to a higher tier was supposed to have their traffic distributed across several pieces of dedicated infrastructure. Because of a related routing decision, all of their traffic had been piling onto one of those pieces, with the others sitting empty.

We would have caught this eventually. Probably the next time someone looked at a latency dashboard and noticed an asymmetry. Probably weeks from now. We caught it today, because we were already there. It cost us one extra question.

This is, I think, an underrated effect of having a low-friction loop. When the cost of looking is low, you look more. When you look more, you find things you would not have specifically gone hunting for. Cheap curiosity compounds.

Logs Nobody Queries Are Not Insight​

The bug that bled 1.3 million times a day was logged faithfully. Every single error was caught, formatted, written out — and ignored. It was not in a dashboard. It did not page anyone. The error path was deliberately fire-and-forget, because the alternative would have been a request-blocking failure mode that we did not want.

A log no one queries is closer to a tree falling in an empty forest than to information. It exists, but it does not act on the world. Most production systems are full of these. We have built a generation of observability tools that are excellent at producing logs and mediocre at producing attention.

The interesting question is not "how do we collect more logs." It is "how do we make the logs that already exist legible to the people, or the agents, who can do something about them."

Ground Truth and the Model​

There is a thing AI systems are bad at, which is making confident claims about specific facts they cannot verify. There is a thing they are good at, which is reasoning over data once that data is in front of them.

The trick is to put the data in front of them. Not as a paragraph in a prompt — as a tool call. Not as yesterday's snapshot — as live state. The model should not be guessing what production looks like; it should be looking.

That is what an MCP server does. It turns whatever capability you wire up — logs, in this case — into a function the model can call when it decides it needs the answer. The model's reasoning is no longer floating; it is anchored to whatever ground truth you have given it access to.

We have spent the last few months wiring our own product into our own conversations. Our logs sit a tool call away from Claude. So do our deployments, our error analytics, our session traces. The result is not magic. It is something quieter and more useful: an engineer and an agent, looking at the same reality at the same time, and reasoning about it together.

The Footnote That Matters​

There is one more thing worth saying, because it is the most honest part of the story. No end user was affected by any of this.

The cluster where the writes were failing was the new one — the secondary side of an in-progress migration. Reads were still being served from the original cluster, which was healthy and complete. The 1.3 million errors a day were silently accumulating inside our own infrastructure, on a side of the system no customer was reading from. To anyone using Shipbook today, everything looked fine. It was fine.

The damage was strictly future damage. The day we cut over reads to the new cluster, every one of those failed updates would have surfaced as a missing field, a stale session, a piece of context that should have been there and was not. The bug was a quiet, slow accumulation of data drift that would have detonated the moment we trusted the new cluster.

I almost did not include this section because it felt like deflating the drama. But it is actually the point. The most valuable bugs to catch are the ones that are not yet on fire — the ones that are loading their fuel quietly, behind a flag, on a path nobody is yet looking at. Those are the ones that turn into postmortems six months later, when the team has forgotten the context and the data is unrecoverable.

We did not catch a customer-facing crisis today. We caught the seed of one, while it was still small enough to fix in an afternoon. That is the kind of catch a tight loop with production data makes possible. Not heroic firefighting. Just earlier noticing.

The Quiet Lesson​

I keep coming back to one thing. The bug we found today was not a hard bug. It was a small, bounded, fixable mistake — the kind of thing any engineer would have spotted in five minutes if they happened to be looking at the right log line.

Nobody was looking. Nobody was going to look. It would have hidden until the migration finished and the damage became visible.

The thing that broke this pattern was not a smarter model or a better dashboard. It was that the model could ask the question, and the answer was right there, in the same conversation. That is the loop we are betting on. It feels small from the inside. From the outside, I think it is going to look like a quiet shift in how production systems are kept healthy.

A flaky test on a Wednesday afternoon is not where I expected to start writing about that. But here we are.