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.
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.
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/
--api-key
) Your project’s API key. Required.
You can find your API key in Project Settings from your BugSnag dashboard.
--app-bundle-version
) The bundle version of this build of the app. Used for display purposes of the build in the BugSnag dashboard.
--app-version-code
) The version code of this build of the app. Used for display purposes of the build in the BugSnag dashboard.
--app-version
) The version of the app. Used for display purposes of the build in the BugSnag dashboard.
--fail-on-upload
) Whether to stop any further uploads if a file fails to upload successfully. By default the command attempts to upload all files.
--ios-app-path
) The path to the iOS app binary, used to determine a unique build ID. By default, the command looks for a binary at build/ios/iphoneos/<AppName>/Frameworks/App.framework/App
.
--overwrite
) Whether to ignore and overwrite existing uploads with same identifier. By default the command will fail if a matching file exists.
--retries
) The number of retry attempts before failing an upload. By default it is only attempted once.
--timeout
) The number of seconds to wait before failing an upload attempt. By default the upload is given 300s (5 mins).
--upload-api-root-url
) The BugSnag On-premise upload server hostname, optionally containing port number. The command will append the appropriate path to access the correct BugSnag API upload endpoint.