Upload Dart symbols

If you are stripping debug symbols from your Dart code when building your Flutter apps, you will need to upload symbol files in order to see full stacktraces in BugSnag.

For installation instructions for the BugSnag CLI, please see our Installation guide.

Overview

The dart command uploads the debug symbols split off from app binaries when the --split-debug-info option is used in a Flutter build – see the Showing full stacktraces guide for more details.

For iOS, the app’s binary is also required in order to obtain a unique build identifier. The command will attempt to find the binary if your project uses the standard directory structure for a Flutter project.

Example usage

To upload symbol files, specify your BugSnag API key and the directory of the generated symbol files:

$ bugsnag-cli upload dart \
    --api-key=YOUR_API_KEY \
    app-debug-info/

You can find your API key in Project Settings from your BugSnag dashboard.

Use the --ios-app-path option to override the path for non-standard project structures:

$ bugsnag-cli upload dart \
    --api-key=YOUR_API_KEY \
    --ios-app-path=build/ios/iphoneos/MyApp/Frameworks/App.framework/App
    app-debug-info/

Available options

API key (--api-key)

The BugSnag API key for the application.

You can find your API key in Project Settings from your BugSnag dashboard.

Bundle version (--bundle-version)

The bundle version of this build of the application (Apple platforms only).

Dry run (--dry-run)

Performs a dry-run of the command without sending any information to BugSnag.

Fail on upload error (--fail-on-upload-error)

Stops the upload when a file fails to upload successfully.

IOS app path (--ios-app-path)

The path to the iOS application binary, used to determine a unique build ID.

Default: build/ios/iphoneos/<AppName>/Frameworks/App.framework/App. .

Log level (--log-level)

Sets the level of logging to debug, info, warn or fatal.

Default: info.

Overwrite (--overwrite)

Whether to ignore and overwrite existing uploads with same identifier, rather than failing if a matching file exists.

Port (--port)

The port number for the BugSnag upload server.

Default: 443.

Retries (--retries)

The number of retry attempts before failing an upload request.

Default: 0.

Timeout (--timeout)

The number of seconds to wait before failing an upload request.

Default: 300.

Upload API root URL (--upload-api-root-url)

The upload server hostname, optionally containing port number.

For use in BugSnag On-premise configurations. The command will append the appropriate path to access the correct upload endpoint.

Default: https://upload.bugsnag.com.

Verbose (--verbose)

Sets the level of the logging to its highest.

This is the equivalent of setting the log level to debug.

Version code (--version-code)

The version code of this build of the application (Android only).

Version name (--version-name)

The version of the application.