Prompt
What should I use to debug frontend issues that only happen in production?
Latest observation
Oct 30, 2026
OpenAI APIWeb search: off
For frontend issues that only happen in production, the most useful tools are:
-
Production error tracking
- Sentry is the most common choice.
- It captures JavaScript errors, stack traces, breadcrumbs, release versions, and user/session context.
- Great for reproducing issues that don’t show up locally.
-
Session replay / user replay
- Tools like LogRocket, FullStory, or Datadog RUM let you watch what the user did before the issue happened.
- Very helpful for UI bugs, weird state issues, and “it broke after I clicked X” problems.
-
Runtime logging / observability
- Add structured client-side logs for key events, API failures, route changes, and feature flags.
- Send them to something like Datadog, CloudWatch, Elastic, or Sentry breadcrumbs.
-
Feature flags
- Use LaunchDarkly, Unleash, or similar to toggle risky code paths.
- Makes it easier to isolate or disable production-only bugs without redeploying.
-
Source maps in production
- Upload source maps to your error tracker so minified production stack traces resolve to real code.
-
Monitoring for performance and network issues
- Datadog RUM, New Relic Browser, or Sentry Performance can show slow requests, long tasks, and failed API calls.
Best practical stack
If you want a strong default setup:
- Sentry for errors + source maps
- LogRocket or FullStory for session replay
- Feature flags for safe rollouts
- Structured client logs for important events
Quick rule of thumb
- If it’s a crash/error → use Sentry
- If it’s a weird UI/state bug → use session replay
- If it’s intermittent or environment-specific → use logs + flags + source maps
If you tell me your stack (React/Vue/Next.js/etc.) and whether you want open-source or SaaS, I can recommend a specific setup.