Issue
I would like to attach Angular source code / source map to my generated Angular CLI project, so that I can debug directives like *ngIf in Chrome.
Is it possible to somehow attach debugger into ng_if.ts using some angular.json configuration / source map ...?
Or is there a setting to add source map in develop mode so that I can step through any 3rd party library with source map attached?
If I press Ctrl + O in Chrome and then type ngIf or ng_if there is no such file in the list menu.
Edit: How it looks like when vendor source maps are served (see accepted answer):
Solution
This made me curious as well. I never did need to debug angular source code, but why not.
It seems there was a vendorSourceMap flag for the ng cli that was deprecated at some point and the new way of doing this is via the angular.json file since v7.2 (https://blog.ninja-squad.com/2019/01/09/angular-cli-7.2/):
"serve": {
"options": {
"sourceMap": {
"scripts": true,
"styles": true,
"vendor": true
},
...
}
Answered By - Andrei Tătar



0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.