Commands
debug-files
Work with debug information files
Commands
Section titled “Commands”sentry debug-files check <path>
Section titled “sentry debug-files check <path>”Inspect a debug information file
Arguments:
| Argument | Description |
|---|---|
<path> |
Path to the debug information file |
sentry debug-files find <id...>
Section titled “sentry debug-files find <id...>”Locate debug files for given debug identifiers
Arguments:
| Argument | Description |
|---|---|
<id...> |
Debug identifier(s) to search for |
Options:
| Option | Description |
|---|---|
-t, --type <type>... |
Only consider debug files of the given type (repeatable). Default: all |
--no-well-known |
Do not look for debug files in well-known locations |
--no-cwd |
Do not look for debug files in the current directory |
-p, --path <path>... |
Add a directory to search recursively (repeatable) |
sentry debug-files prepare <path...>
Section titled “sentry debug-files prepare <path...>”Split WebAssembly debug info and upload it to Sentry
Arguments:
| Argument | Description |
|---|---|
<path...> |
WebAssembly files or directories to scan |
Options:
| Option | Description |
|---|---|
--dry-run |
Classify modules without writing or uploading anything |
--no-upload |
Split modules but do not upload the companions |
--require-dwarf |
Fail if any scanned module lacks DWARF debug info |
--out-dir <out-dir> |
Directory for *.debug.wasm companions (modules are stripped in place) |
--strip-names |
Also drop the name section from split modules (companion keeps it) |
--build-id <build-id> |
Use this UUID as the build id instead of a random one |
--include-sources |
Also upload a source bundle for each companion |
--ignore <ignore>... |
Skip files and folders matching this glob (repeatable) |
--ignore-file <ignore-file> |
Skip files and folders listed in this ignore file |
--wait |
Wait for server-side processing and report any errors |
--wait-for <wait-for> |
Wait up to this many seconds for server-side processing |
sentry debug-files upload <path...>
Section titled “sentry debug-files upload <path...>”Upload debug information files to Sentry
Arguments:
| Argument | Description |
|---|---|
<path...> |
Files or directories to scan for debug information files |
Options:
| Option | Description |
|---|---|
-t, --type <type>... |
Only upload files of this type (repeatable): dsym, elf, pe, pdb, portablepdb, wasm, breakpad, sourcebundle, jvm |
--id <id>... |
Only upload the object with this debug id (repeatable) |
--require-all |
Fail if any --id value was not found among scanned files |
--no-debug |
Do not upload files whose only feature is debug/symbol info |
--no-unwind |
Do not upload files whose only feature is unwind info |
--no-sources |
Do not upload files whose only feature is source info |
--include-sources |
Build and upload a source bundle for each file with debug info |
--il2cpp-mapping |
Compute and upload Unity IL2CPP line mappings for each scanned file |
--derived-data |
Also scan Xcode's DerivedData folder (macOS only) |
--no-zips |
Do not scan inside .zip archives |
--no-upload |
Scan and print what would be uploaded without uploading |
--wait |
Wait for server-side processing and report any errors |
--wait-for <wait-for> |
Wait up to this many seconds for server-side processing |
sentry debug-files print-sources <path>
Section titled “sentry debug-files print-sources <path>”List the source files a debug file references
Arguments:
| Argument | Description |
|---|---|
<path> |
Path to the debug information file |
sentry debug-files bundle-sources <path>
Section titled “sentry debug-files bundle-sources <path>”Bundle a debug file's source files for source context
Arguments:
| Argument | Description |
|---|---|
<path> |
Path to the debug information file |
Options:
| Option | Description |
|---|---|
-o, --output <output> |
Output path for the source bundle ZIP (default: |
sentry debug-files bundle-jvm <path>
Section titled “sentry debug-files bundle-jvm <path>”Create a JVM source bundle for source context
Arguments:
| Argument | Description |
|---|---|
<path> |
Directory containing JVM source files |
Options:
| Option | Description |
|---|---|
-o, --output <output> |
Output directory for the bundle ZIP |
-d, --debug-id <debug-id> |
Debug ID (UUID) to stamp on the bundle |
-e, --exclude <exclude>... |
Additional directory names to exclude (repeatable) |
All commands support --json for machine-readable output and --fields to select specific JSON fields.
Examples
Section titled “Examples”# Inspect a debug information file (auto-detects the format)sentry debug-files check ./libexample.sosentry debug-files check MyApp.dSYM/Contents/Resources/DWARF/MyAppsentry debug-files check ./app.pdb --json
# List the source files a debug file references (and whether they're available)sentry debug-files print-sources ./libexample.sosentry debug-files print-sources ./app.pdb --json
# Locate debug files for one or more debug identifiers on disksentry debug-files find <debug-id>sentry debug-files find <debug-id> --type dsym --path ./buildsentry debug-files find <debug-id> --no-cwd --no-well-known -p /symbols --json
# Bundle a debug file's referenced source files (run on the build machine)sentry debug-files bundle-sources ./libexample.sosentry debug-files bundle-sources ./app.pdb --output ./app.src.zip
# Bundle JVM sources with a debug IDsentry debug-files bundle-jvm --output ./out --debug-id <uuid> ./src
# Exclude additional directoriessentry debug-files bundle-jvm --output ./out --debug-id <uuid> --exclude generated --exclude build-tools ./src
# Output as JSONsentry debug-files bundle-jvm --output ./out --debug-id <uuid> --json ./src
# Upload debug information files (scans directories recursively)sentry debug-files upload ./buildsentry debug-files upload ./libexample.so --include-sources
# .zip archives are scanned in place; use --no-zips to skip themsentry debug-files upload ./symbols.zipsentry debug-files upload ./build --no-zips
# Restrict by type or debug id, and wait for server-side processingsentry debug-files upload ./dsyms --type dsym --waitsentry debug-files upload ./build --id <debug-id> --require-all
# Unity: upload IL2CPP line mappings (optionally with referenced C# sources)sentry debug-files upload ./build --il2cpp-mappingsentry debug-files upload ./build --il2cpp-mapping --include-sources
# Preview what would be uploaded without uploading (no credentials needed)sentry debug-files upload ./build --no-upload
# Split WebAssembly debug info and upload it (scans directories recursively)sentry debug-files prepare ./dist
# Preview the split without writing or uploading anythingsentry debug-files prepare ./dist --dry-run
# Split only, keeping the companions localsentry debug-files prepare ./dist --no-upload
# Write companions elsewhere; modules are still stripped in placesentry debug-files prepare ./dist --out-dir ./symbols
# Fail the build if any module was compiled without DWARFsentry debug-files prepare ./dist --require-dwarfNotes on prepare
Section titled “Notes on prepare”debug-files preparereplaces the two-stepwasm-split+debug-files uploadworkflow for WebAssembly. Its output is byte-identical towasm-split, so companions from either tool behave the same in Sentry.- For each module carrying inline DWARF it injects a
build_id(if absent), writes a*.debug.wasmcompanion retaining the Code section and DWARF, strips the.debug_*sections from the deployable module in place, and points it at the companion viaexternal_debug_info. Your build artifact keeps its path; only the companion is new. - The companion must keep the Code section — DWARF addresses are relative to it, so a companion without it cannot be symbolicated.
- Modules without DWARF are still stamped with a
build_idand reported with a warning rather than failing the run. Sentry matches a frame to its debug file bybuild_id, so stamping now keeps symbolication possible later. - Name/symtab-only modules are not uploaded: the
namesection stays in the deployable module and runtimes read function names from it directly, so a debug file built from one adds nothing to the stack trace. - Running the command twice is safe. A module whose companion already exists
with a matching
build_idis reported as already prepared and left alone. --require-dwarfexits non-zero when any scanned module lacks DWARF, which is the flag to use in CI. A module whoseexternal_debug_infonames a companion that cannot be found fails the gate too, since its debug info is unreachable.
Notes on find
Section titled “Notes on find”debug-files findlocates debug files locally by debug identifier — it makes no API calls. It searches Xcode'sDerivedData(for dSYMs, unless--no-well-known), the current directory (unless--no-cwd), and any--path/-pdirectories, recursively.- Restrict the search with
--type/-t(repeatable):dsym,elf,pe,pdb,portablepdb,sourcebundle,breakpad,proguard,jvm. - A debug identifier must match exactly, including any PE/PDB age suffix. A Breakpad symbol file is listed when it matches, but does not satisfy the request (the id is still reported as missing).
- Exits non-zero if any requested identifier could not be located.
Important Notes
Section titled “Important Notes”check,print-sources,bundle-sources, andbundle-jvmare local-only — they make no network requests. They parse object files in-process (Mach-O/dSYM, ELF, PE/PDB, Portable PDB, WebAssembly, Breakpad, source bundles) via a bundledsymbolicWASM module.checkexits non-zero if the file is not usable for symbolication (no debug id or no useful features).print-sourceslists the source files each object references, reporting for each whether the source is embedded in the debug file, available via a source link, or present on the local disk. It is a read-only preview of whatbundle-sourceswould collect and always exits zero on a parseable file.bundle-sourcesreads source files from the paths recorded in the debug info, so it is normally run on the build machine right after compiling. Referenced files that are not present locally are skipped; it exits non-zero (writing nothing) when none are found. The bundle defaults to<path>.src.zipand is uploaded viasentry debug-files upload.uploadscans each path (files or directories, walked recursively) for native debug information files, parses them in-process, and uploads matching files via the chunk-upload protocol. Use--type/--idto restrict which files are sent,--no-debug/--no-unwind/--no-sourcesto drop files whose only useful feature is the named one, and--include-sourcesto attach a source bundle per file..ziparchives are scanned in place by default (their entries run through the same filters; nested archives are not recursed) — pass--no-zipsto skip them.--derived-dataadditionally scans Xcode's~/Library/Developer/Xcode/DerivedDatafolder (macOS only).--no-uploadpreviews the selection without credentials;--wait/--wait-forblock on server-side processing and exit non-zero if any file fails.--require-allfails if a requested--idwas not found. The server-advertised maximum file size and maximum processing wait are honored automatically (oversized files are skipped with a warning). BCSymbolMap resolution (the legacy--symbol-mapsflag) is intentionally unsupported — it only applies to Apple Bitcode, which Apple has deprecated and the App Store no longer accepts. Use the legacy Rustsentry-cliif you still need it.- Managed .NET PE assemblies that embed a Portable PDB have it extracted and
uploaded automatically as a separate
<name>.pdbdebug file (no flag needed). --il2cpp-mappingcomputes Unity IL2CPP C++→C# line mappings from each file's referenced generated C++ sources and uploads them as separateil2cppdebug files. Combine with--include-sourcesto also bundle the referenced C# source files.- Upload a JVM bundle separately via
sentry debug-files upload --type jvm. - Supported JVM source file extensions:
.java,.kt,.scala,.sc,.groovy,.gvy,.gy,.gsh,.clj,.cljc - Build output directories (
build/,target/,out/,bin/) are automatically excluded unless they appear under asrc/ancestor. - Source-set prefixes (e.g.,
src/main/java/) are stripped to produce package-relative paths matching JVM stack traces.