Environment
sentry 0.45.0 (legacy @sentry/cli 3.3.3 behaves the same)
@angular/cli / @angular/build 22.1, Node 24
Steps to Reproduce
Repro (unmodified ng new --minimal plus two scripts): https://github.com/Sekky61/sentry-cli-angular-debugid-repro
npm ci
npm run repro # ng build --source-map → sentry sourcemap inject → count snippets
npm run control # same, but Angular's debug ID is removed before injecting
Expected Result
main-*.js keeps its debug ID and gets the _sentryDebugIds snippet.
Actual Result
| script |
sentry sourcemap inject |
_sentryDebugIds snippets in main-*.js |
repro |
Files modified 0, skipped 1 |
0 |
control |
Files modified 1, skipped 0 |
1 |
Since 22.1 (angular/angular-cli#33110), ng build writes an ECMA-426 debug ID (a //# debugId= comment and a debugId in the map) but no runtime snippet. The CLI takes the comment as "already injected" and skips the file, so the runtime snippet is missing and events carry no debug_meta.
Context
- getsentry/sentry-cli#2419 is the same problem. It was closed as
not_planned with a request to reopen it here if it is still relevant.
- #1496 lists the map-only variant as a known gap. This is the JS-comment variant, which perhaps was overlooked there.
- Possible fix, as suggested in #2419: detect injection by the snippet instead of the comment, and add the snippet under the existing ID when it is missing.
Environment
sentry0.45.0 (legacy@sentry/cli3.3.3 behaves the same)@angular/cli/@angular/build22.1, Node 24Steps to Reproduce
Repro (unmodified
ng new --minimalplus two scripts): https://github.com/Sekky61/sentry-cli-angular-debugid-reproExpected Result
main-*.jskeeps its debug ID and gets the_sentryDebugIdssnippet.Actual Result
sentry sourcemap inject_sentryDebugIdssnippets inmain-*.jsreproFiles modified 0,skipped 1controlFiles modified 1,skipped 0Since 22.1 (angular/angular-cli#33110),
ng buildwrites an ECMA-426 debug ID (a//# debugId=comment and adebugIdin the map) but no runtime snippet. The CLI takes the comment as "already injected" and skips the file, so the runtime snippet is missing and events carry nodebug_meta.Context
not_plannedwith a request to reopen it here if it is still relevant.