Skip to content
Development
Command

/sourcemap

`sentry sourcemap inject` is a purely local file operation — it does not make any API calls and does not require authentication. You can run it in CI before authenticating.

From plugin
toolkit
97342 skills1 agent42 commands2 MCP
> /plugin marketplace add getsentry/toolkit
> /plugin install sentry-mcp@sentry-mcp

Command definition

sourcemap.md

Debug ID injection

`sentry sourcemap inject` is a purely local file operation — it does not make any API calls and does not require authentication. You can run it in CI before authenticating.

Existing debug IDs from JavaScript comments or sourcemaps are preserved. If a bundler emits an ID without Sentry's runtime registration snippet, `inject` adds the snippet and adjusts the sourcemap mappings. Bundles that already register their ID are left unchanged. `sourcemap upload` applies the same injection by default, unless `--no-rewrite` is passed. Binary bundles with an existing debug ID in their sourcemap are left unchanged.

Resolving sourcemap linkage

Use `sentry sourcemap resolve` to debug why `sentry sourcemap upload` may not find the expected sourcemaps. It is read-only and never modifies files. For each JavaScript file, it reports whether the companion `.map` was located (by convention or via a `sourceMappingURL` directive), whether the map is inline (`data:` URL) or remote, and whether a Sentry debug ID is present.

Error handling

Both `sentry sourcemap inject` and `sentry sourcemap upload` exit with an error if zero JS + sourcemap pairs are discovered in the target directory. This catches silent bundler misconfigurations — the most common cause is a bundler that isn't emitting `.map` files:

# Vite / Astro: set `vite.build.sourcemap: "hidden"` (Astro 5) or
# `vite.environments.client.build.sourcemap: "hidden"` (Astro 6+).

# webpack: set `devtool: "hidden-source-map"`.

# esbuild: set `sourcemap: true` or `sourcemap: "linked"`.

For CI steps that may run against legitimately-empty directories (e.g., library-only repos, conditional release skips), pass `--allow-empty` to suppress the error.

Read more
@getsentry
Ships withtoolkit

This repository contains the Sentry CLI, the Sentry MCP server, and shared packages. For the CLI, see the CLI guide and the published documentation at . The documentation index covers both products and shared contributor guidance.

9731 skill1 agent2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
973
Star history of getsentry/sentry-mcp on GitHub, a chart by star-history.com

Other commands on toolkit.

alert

alert

Command

Triggers take `alertThreshold`, an optional `label` (`critical` or `warning`), `resolveThreshold`, and `thresholdType` (`0`…

@getsentry@getsentryInstall Command
api

api

Command

Endpoints are relative to `/api/0/` — the prefix is added automatically. Absolute HTTP(S) Sentry URLs also work; their origin is…

@getsentry@getsentryInstall Command
attribute

attribute

Command

Attributes are the typed key-value data attached to spans, logs, and metric samples. Their keys can be passed to other commands…

@getsentry@getsentryInstall Command
auth

auth

Command

Bare `sentry auth` logs in when you're logged out and shows status when you're already authenticated. `sentry auth login` always…

@getsentry@getsentryInstall Command
build

build

Command

- `build upload` supports **Android APK/AAB** and **iOS XCArchive/IPA**. An XCArchive is a directory; an IPA is converted to an…

@getsentry@getsentryInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command