# Dart Symbols

If you build your Flutter application with debug symbols stripped (`--strip-debug-info`) you will need to upload the generated symbol files to see the source file, line number and method in stacktraces on your dashboard.

Splitting debug info will produce a directory named `app-debug-info` containing one `.symbols` file for each architecture and platform you have targeted. Each of these files needs to be uploaded to the [POST /dart-symbol](/bugsnag/docs/bugsnag-upload-api#/Dart/uploadDartSymbol), along with a unique build identifier.

## Extracting build identifiers

The [BugSnag CLI](https://docs.bugsnag.com/build-integrations/bugsnag-cli/) can be used to extract this identifier from your symbol files and upload it to the appropriate BugSnag endpoint in one command. See the [BugSnag CLI guide](https://docs.bugsnag.com/build-integrations/bugsnag-cli/) for installation and a full list of options.

To integrate directly with the upload API, use the following techniques to obtain the build identifier required for the upload:

### Android builds

Use the `readelf` tool to extract the "Build ID" from each generated `.symbols` file:

```bash
$ readelf --notes app-debug-info/app.android-arm64.symbols | grep 'Build ID'
```

If `readelf` is not globally installed on your platform, you can find a suitable version (sometimes named `llvm-readelf`) in your NDK toolchain.

Use the hexadecimal string produced by this command (such as `0a70ca6d63ab03282a01eabf4f5f33e7`) for the `buildId` parameter in your request. This should be repeated for each architecture you are supporting.

### iOS builds

The build identifier for iOS is the Mach-O UUID generated for the binary containing your app's Dart code. This can be extracted using Xcode's `dwarfdump` as follows:

```bash
$ dwarfdump --uuid build/ios/iphoneos/MyApp.app/Frameworks/App.framework/App
```

Use the UUID produced by this command (such as `2B9C4665-56F7-38FD-923E-BBC2F219EDA6`) for the `buildId` parameter in your request. This should be repeated for each architecture you are supporting.

## Example cURL

```bash
$ curl https://your.upload.server/dart-symbol\
    -F symbolFile=@path/to/example.dart.symbols\
    -F apiKey=YOUR_API_KEY_HERE\
    -F buildId=11111111BBBB3333DDDD555555555555F\
    -F appVersion=1.2.3\
    -F appVersionCode=1.2.3\
    -F platform=android
```

## Symbolication guide

See our [symbolication guide](https://docs.bugsnag.com/platforms/flutter/showing-full-stacktraces/) for a higher-level overview of integrating uploads into your build systems to see full stacktraces for all your releases.
