Debug Information Files

Debug information files allow Sentry to extract stack traces and provide more information about crash reports for most compiled platforms. sentry-cli can be used to validate and upload debug information files. For more general information, refer to Debug Information Files.

The sentry-cli requires an Organization Auth Token so that Debug Information Files can be uploaded.

Not all debug information files can be used by Sentry. To see if they are usable or not, you can use the sentry-cli debug-files check command:

sentry-cli debug-files check

Debug Info File Check
  Type: elf debug companion
  Contained debug identifiers:
    > 924e148f-3bb7-06a0-74c1-36f42f08b40e (x86_64)
  Contained debug information:
    > symtab, debug
  Usable: yes

This will report the debug identifiers of the debug information file as well as if it passes basic requirements for Sentry.

If you see in Sentry's UI that debug information files are missing, but you are not sure how to locate them, you can use the sentry-cli debug-files find command to look for them:

sentry-cli debug-files find <identifier>

Additionally, sentry-cli debug-files upload can automatically search for files in a folder or ZIP archive.

To get inline source context in stack traces in the Sentry UI, sentry-cli can scan debug files for references to source code files, resolve them in the local file system and bundle them up. The resulting source bundle is an archive containing all source files referenced by a specific debug information file.

This is particularly useful when building and uploading debug information files are detached. In this case, a source bundle can be created when building and can be uploaded at any later point in time with sentry-cli debug-files upload.

To create a source bundle, use the debug-files bundle-sources command on a list of debug information files:

# on the build machine:
sentry-cli debug-files bundle-sources /path/to/files...

# at any later time:
sentry-cli debug-files upload --type sourcebundle /path/to/bundles...

To create multiple source bundles for all debug information files, use the command on each file individually.

Alternatively, add the --include-sources option to the debug-files upload command, which generates source bundles on the fly during the upload. This requires that the upload is performed on the same machine as the application build:

sentry-cli debug-files upload --include-sources /path/to/files...

Use the sentry-cli debug-files upload command to upload debug information files to Sentry. The command will recursively scan the provided folders or ZIP archives. Files that have already been upload are skipped automatically.

We recommend uploading debug information files when publishing or releasing your application. Alternatively, files can be uploaded during the build process. See Debug Information Files for more information.

A basic debug file upload can be started with:

sentry-cli debug-files upload -o <org> -p <project> /path/to/files...

> Found 2 debug information files
> Prepared debug information files for upload
> Uploaded 2 missing debug information files
> File processing complete:

  PENDING 1ddb3423-950a-3646-b17b-d4360e6acfc9 (MyApp; x86_64 executable)
  PENDING 1ddb3423-950a-3646-b17b-d4360e6acfc9 (MyApp; x86_64 debug companion)

After the upload, Sentry analyzes the files to symbolicate future events. If you want to send a native crash to Sentry to verify correct operation, ensure that the debug files are listed in Project Settings > Debug Files. Alternatively, specify --wait in the CLI, which will block until server-side analysis is complete:

sentry-cli debug-files upload -o <org> -p <project> --wait /path/to/files...

> Found 2 debug information files
> Prepared debug information files for upload
> Uploaded 2 missing debug information files
> File processing complete:

      OK 1ddb3423-950a-3646-b17b-d4360e6acfc9 (MyApp; x86_64 executable)
      OK 1ddb3423-950a-3646-b17b-d4360e6acfc9 (MyApp; x86_64 debug companion)

The command's --help output lists and explains all options:

sentry-cli debug-files upload --help

If you are hiding debug symbols from Apple, the debug files will not contain many useful symbols. In that case, the sentry-cli upload will warn you that it needs BCSymbolMaps:

sentry-cli debug-files upload ...
> Found 34 debug information files
> Warning: Found 10 symbol files with hidden symbols (need BCSymbolMaps)

In this case, you need the BCSymbolMaps that match your files. Typically, these are generated by the Xcode build process. Supply the --symbol-maps parameter and point it to the folder containing the symbol maps:

sentry-cli debug-files upload --symbol-maps path/to/symbolmaps path/to/debug/symbols

In contrast to native debug files, Breakpad symbols discard a lot of information that is not required to process minidumps. Most notably, inline functions are not declared, such that Sentry is not able to display inline frames in stack traces.

If possible, upload native debug files such as dSYMs, PDBs or ELF files instead of Breakpad symbols.

sentry-cli can be used to upload ProGuard files to Sentry; however, in most situations, you would use the Gradle plugin to do that. Nevertheless, there may be situations where you would upload ProGuard files manually. For instance, when you only release some of the builds you're creating.

The upload-proguard command is the one to use for uploading ProGuard files. It takes the path to one or more ProGuard mapping files and will upload them to Sentry.

sentry-cli upload-proguard \

Since the Android Sentry SDK needs to know the UUID of the mapping file, you need to associate it with the upload. However, you first have to place that UUID into the AndroidManifest.xml file:

  <meta-data android:name="io.sentry.proguard-uuid" android:value="A_VALID_UUID" />

The same UUID needs to be used to upload the mapping file:

sentry-cli upload-proguard \
    --uuid A_VALID_UUID \

Additionally, you can associate the proguard mapping file to a specific release:

# Additionally create an association to the release
sentry-cli upload-proguard \
    --uuid A_VALID_UUID \
    app/build/outputs/mapping/{BuildVariant}/mapping.txt \
    --app-id \
    --version 1.0.0 \
    --version-code 1

After the upload, Sentry deobfuscates future events. To make sure that it worked, you can check Project Settings > ProGuard and see if the upload mapping files are listed.

The command's --help output lists and explains all options:

sentry-cli upload-proguard --help

If you're using a build tool we don't support, or you prefer not to use Sentry's build tool plugins, you'll need to upload source bundle files manually.

See the build tool plugins we currently support here:

You can also upload ProGuard files manually with sentry-cli for any JVM-based language like Java or Kotlin.

Run the debug-files bundle-jvm command to create a source bundle for a source directory.

sentry-cli debug-files bundle-jvm \
    --output some/dir \
    --debug-id A_VALID_UUID \

You must provide the UUID of the source bundle for the Java/Android SDK to send. More details can be found in the Source Context docs for Java and the Source Context docs for Android.

The debug-files upload command allows you to upload the source bundle you created to Sentry.

sentry-cli debug-files upload \
    --type jvm \

After the upload, Sentry will attach Source Context to future events.

To make sure these steps worked, check Project Settings > Debug Files in to see if the uploaded source bundle files are listed.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").