---
title: "How do you debug a crash in a React Native release build?"
description: "Release crashes are minified and sometimes native. Reproduce with a release build, read native logs, and symbolicate JavaScript with source maps."
url: "https://bugsee.com/answers/react-native/debug-a-production-crash/"
---

# How do you debug a crash in a React Native release build?

Reproduce it in a release build, read the native log (Logcat or Xcode console) for the real error, and map minified JavaScript stack traces back with source maps.

Debug builds hide many problems that only appear in release: minification, Hermes bytecode, disabled dev warnings and stricter native optimizations.

```bash
npx react-native run-android --mode release
npx react-native run-ios --mode Release

adb logcat *:E          # Android errors
# iOS: run from Xcode and watch the console, or use Console.app for a connected device
```

- Decide first whether it is a JavaScript error (a red-screen exception in debug, a silent exit or JS stack in release) or a native crash (a signal such as `SIGSEGV`, or a Java exception in Logcat).
- For JavaScript, generate source maps during the release build and use them to turn bundle line numbers into file and function names.
- For native crashes on Android, keep the ProGuard/R8 mapping file; on iOS, keep the dSYM files, so stack traces can be symbolicated later.

Keeping those symbol files for every release you ship is what makes a crash report from a user's phone readable weeks later.

Bugsee captures crashes and the session leading up to them in React Native apps, with symbolication for both JavaScript and native frames. https://bugsee.com/react-native-monitoring/

## Related questions

- [How do you clear the Metro bundler cache in React Native?](https://bugsee.com/answers/react-native/clear-the-metro-cache/)
