# Debug Symbols | Sentry for React Native

Debug symbols help provide you with readable stack traces, which Sentry displays on the **Issue Details** page, to help you triage an issue. We offer a range of methods to provide Sentry with debug symbols.

## [When to Upload](https://docs.sentry.io/platforms/react-native/upload-debug.md#when-to-upload)

With default settings, complete stack traces are available in your Java/Kotlin error, out of the box, unless you use [enableProguardInReleaseBuilds](https://reactnative.dev/docs/signed-apk-android#enabling-proguard-to-reduce-the-size-of-the-apk-optional). In this case, you need to upload the ProGuard/R8 mapping files generated by the [Android Gradle Plugin](https://developer.android.com/studio/build/shrink-code#shrink-code), so Sentry can show you proper stack traces.

## [Uploading With Sentry Gradle Plugin](https://docs.sentry.io/platforms/react-native/upload-debug.md#uploading-with-sentry-gradle-plugin)

Upload the [Android ProGuard/R8 mapping files and native symbols](https://docs.sentry.io/platforms/android/enhance-errors/proguard.md) by the recommended method of using our Gradle integration.

Errors raised from the native layer in Android apps require certain debug information files to be uploaded. For example, DWARF debug files need to be uploaded for an Android app with [NDK](https://developer.android.com/ndk/) support.

To upload native symbols for React Native Android builds, use the Sentry Gradle Plugin's [`uploadNativeSymbols` option](https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup.md#enable-sentry-agp).

## [Uploading With Xcode](https://docs.sentry.io/platforms/react-native/upload-debug.md#uploading-with-xcode)

To upload native iOS debug symbols, set up a Run Script build phase for uploading debug symbols to Sentry with the Sentry CLI. You can find documentation for this on the [Manual Configuration](https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup.md#upload-debug-symbols-to-sentry) page.

## [Uploading With sentry-cli](https://docs.sentry.io/platforms/react-native/upload-debug.md#uploading-with-sentry-cli)

Upload the [Android ProGuard/R8 mapping files and native symbols](https://docs.sentry.io/cli.md) manually by using `sentry-cli` [upload-proguard](https://docs.sentry.io/cli/dif.md#proguard-mapping-upload) and [debug-files](https://docs.sentry.io/cli/dif.md#uploading-files).

## [Uploading Source Context With Sentry Gradle Plugin](https://docs.sentry.io/platforms/react-native/upload-debug.md#uploading-source-context-with-sentry-gradle-plugin)

To enable [Source Context](https://docs.sentry.io/platforms/android/data-management/debug-files/source-context.md) use the [`includeSourceContext`](https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup.md#enable-sentry-agp) Sentry Gradle Plugin option.

## [Uploading Source Context With Xcode](https://docs.sentry.io/platforms/react-native/upload-debug.md#uploading-source-context-with-xcode)

To enable [Source Context](https://docs.sentry.io/platforms/apple/guides/ios/data-management/debug-files/source-context.md) set up a [Run Script build phase for uploading debug symbols to Sentry](https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup.md#upload-debug-symbols-to-sentry) and set `SENTRY_INCLUDE_NATIVE_SOURCES=true` before the build.
