[ng test]
Can't debug tests when -code-coverage
#22010
Labels
area: @angular-devkit/build-angular
devkit/build-angular:karma
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Milestone
🐞 Bug report
Command
Is this a regression?
I have never really seen it worked despite a previously closed issue #7117
Description
When
ng test
runs with--code-coverage
, sourcemaps for *.ts source files do not match (while sourcemaps for *.spec.ts files are fine). Thus it is not possible to breakpoint into source files nor step in the code. So either you get the sourcemaps or if you need to debug your test, you need to stop the tests and relaunch it without--code-coverage
.🔬 Minimal Reproduction
Any angular project with latest version and source with spec files can demonstrate de problem.
ng test --code-coverage
, Karma launches the browserNB: there is no problem adding breakpoints or step in spec files, the problem only happens in source files.
NB: there is no problem without
--code-coverage
🌍 Your Environment
The text was updated successfully, but these errors were encountered: