- Web (JavaScript): Upload
sourcemapfiles via Flashduty CLI - Android: Automatically upload ProGuard/R8 mapping files and NDK symbol files via a Gradle plugin
- iOS: Upload dSYM symbol files via Flashduty CLI
Why Do You Need Source Mapping?
In modern application development, code is typically minified, obfuscated, or compiled to optimize loading speed and performance. Whether it’s JavaScript minification on the Web, ProGuard/R8 obfuscation on Android, or compilation optimization on iOS, these processes cause code location information in error stacks to not directly map to the original source code, increasing debugging difficulty.Map Minified Code
SourceMap records the mapping relationship between minified code and original code, allowing developers to view unminified source code during debuggingPrecise Error Location
Through
SourceMap, you can directly locate the specific position in the original source code in error trackingImprove Debugging Efficiency
Developers don’t need to manually decode minified files, saving time troubleshooting issues
Generate SourceMap
Most modern build tools (such as Webpack, Rollup, or Vite) support generatingSourceMap.
- Webpack
- Vite
- Rollup
Enable After building, the
SourceMap generation in webpack.config.js:dist directory will contain bundle.js and the corresponding bundle.js.map file.Upload SourceMap
Use Flashduty CLI to uploadsourcemap files to the Flashduty server.
Configure Upload Parameters

Used to authenticate your identity
Application service name (e.g.,
my-service)Application release version (e.g.,
1.0.0)Path prefix for minified files (e.g.,
/assets)Upload Android Symbol Files
After Android apps use ProGuard/R8 for code obfuscation, class names and method names in error stacks are replaced with meaningless short names. By uploading mapping files, Flashduty can restore obfuscated stacks to original code. For apps containing NDK native code, NDK symbol files also need to be uploaded to restore C/C++ layer stacks.Configure API Key
Provide the API Key via environment variables or project configuration file:You can also create a
flashcat-ci.json configuration file in the project root:Upload iOS dSYM Files
iOS apps generate dSYM (Debug Symbol) files during compilation, containing the debug symbol information needed to map memory addresses back to source code locations. After uploading dSYM files, Flashduty can restore addresses in crash stacks to readable function names, file names, and line numbers.Obtain dSYM Files
dSYM files can be obtained from the following locations:
- Xcode Local Build: Find
.dSYMfiles in the Xcode Build Products directory - Xcode Archive: Export dSYMs through the Organizer window
- App Store Connect: Download dSYMs from App Store Connect (requires enabling symbol upload in build settings)
Symbol File Management
On the Flashduty platform, symbol file management is done through the “Application Management” - “Source Code Management” menu:| Feature | Description |
|---|---|
| View Uploaded Symbol Files | List all uploaded files (SourceMaps, mapping files, dSYMs), including path, service name, version, size, and upload time |
| Version Management | Manage different application versions separately through service and release-version parameters |
| Permission Control | Ensure only authorized users can upload or manage through API Key |
View Source Code in Error Tracking
RUM integratessourcemap functionality, supporting direct viewing of original source code in the Error Tracking module for precise problem localization.
Capture Frontend Errors
RUM SDK automatically captures frontend errors (such as JavaScript exceptions, Promise rejections, network errors, etc.) and sends error stack information to the server.
Associate SourceMap
When the file path and line number in the error stack match an uploaded Mapped source code:
sourcemap, Flashduty automatically maps the minified code error location to the original source code.Minified file stack:View Error Details
In the Error Tracking module, click a specific error record to view:
- Error message: e.g.,
Something went wrong - Original stack: Mapped source code file path, line number, and column number
- Context code: Display source code snippet near the error location
Best Practices
Standardize SourceMap Upload
Standardize SourceMap Upload
Integrate upload commands in CI/CD pipelines to ensure automatic
sourcemap upload with each release.GitHub Actions Example:Version Management
Version Management
Use the
--release-version parameter to match the application version number for easy tracking of specific version sourcemaps.Clean Up Source Code
Clean Up Source Code
Delete
sourcemap files before uploading resources to CDN to avoid bringing source code information into production.Test Mapping Effect
Test Mapping Effect
After uploading
sourcemap, proactively throw test errors to verify that the Error Tracking module correctly maps to source code.Frequently Asked Questions
Why isn't the error stack mapped to source code?
Why isn't the error stack mapped to source code?
- Confirm that
sourcemapwas successfully uploaded andminified-path-prefixmatches the actual deployment path - Check that
serviceandrelease-versionmatch the application version when the error occurred
How to prevent SourceMap from leaking sensitive information?
How to prevent SourceMap from leaking sensitive information?
- Ensure
sourcemapfiles are only uploaded to the Flashduty server, not directly exposed on the public network - In production, remove direct access to
sourcemapfiles (e.g., through Nginx configuration)
What if SourceMap upload fails?
What if SourceMap upload fails?
- Check if
API Keyis valid - Ensure network connection is normal and CLI version is the latest
Next Steps
Error Grouping
Learn about error grouping mechanisms
Issue Status
Manage Issue status transitions