Source Maps

Sentry supports demangling of transpiled, minified, and bundled JavaScript using source maps, which are JSON files that contain information about how to map your deployed code back to its original source(s). This lets you view source code context obtained from stack traces in its original, untransformed form. This is particularly useful when debugging minified and/or transpiled code, since both of those processes make large enough changes to the code that it often becomes nearly unrecognizable in its final deployed form. Source maps also allow Sentry to show each line in the stack trace in context, by including additional lines of code on either side.

Integrate your project's source maps with Sentry using these steps:

1: Generate Source Maps

Source maps can be generated by transpilers, minifiers, or bundlers you might be using in your project. We provide instructions to configure common tools that output source maps here.

2: Provide Source Maps to Sentry

For Node.js projects, bundles and source maps need to be uploaded to Sentry.

If you use Webpack in your project, we recommend generating and uploading your source maps by way of sentry-webpack-plugin. If you use a different tool to generate source maps, you can use sentry-cli to upload them to Sentry.

Learn more about how to upload source maps here.

Next Steps

Additional Resources