How to debug a Next.js production bug with Logs and Sentry

Jan 13, 2026

Stack traces tell you what broke. They rarely tell you why.

In this video, Serge walks through a real Next.js production bug that only affected Firefox and Safari. The error showed up clearly in Sentry, but the stack trace alone wasn’t enough to explain what was going wrong. The missing piece turned out to be logs.

You’ll see how adding logs to a Next.js API route exposed unexpected request data, how those logs connected back to traces, and how that context made the root cause obvious and easy to fix.

If you’re debugging Next.js issues in production, especially ones that don’t reproduce locally, this is a practical look at when logs matter and how to use them effectively.

Learn more about logging in Next.js with Sentry:
https://docs.sentry.io/platforms/javascript/guides/nextjs/logs/

Prefer a written version to pass along to your coding agents? https://blog.sentry.io/not-everything-that-breaks-is-an-error-a-logs-and-next-js-story/

Try Sentry for free: https://sentry.io
Docs: https://docs.sentry.io