Skip to content

Commit 52ace04

Browse files
karchermhybrist
authored andcommitted
fix(@schematics/angular): improve VS Code background compilation start/end detection
The task is initially "active", and should be considered "completed" when the bundle generation result is displayed, even if the generation failed. The task should only switch back to "active" when changes are detected, not on any arbitrary output by `ng watch`. This change enables proper handling of re-attaching the debugger while the background task is already running. Fixes #32111
1 parent fd8b4c8 commit 52ace04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/schematics/angular/workspace/files/__dot__vscode/tasks.json.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"background": {
1313
"activeOnStart": true,
1414
"beginsPattern": {
15-
"regexp": "(.*?)"
15+
"regexp": "Changes detected"
1616
},
1717
"endsPattern": {
18-
"regexp": "bundle generation complete"
18+
"regexp": "bundle generation (complete|failed)"
1919
}
2020
}
2121
}
@@ -30,10 +30,10 @@
3030
"background": {
3131
"activeOnStart": true,
3232
"beginsPattern": {
33-
"regexp": "(.*?)"
33+
"regexp": "Changes detected"
3434
},
3535
"endsPattern": {
36-
"regexp": "bundle generation complete"
36+
"regexp": "bundle generation (complete|failed)"
3737
}
3838
}
3939
}

0 commit comments

Comments
 (0)