以下の内容で、[プロジェクト]/.vscode/launch.json ファイルを作成
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome against localhost, with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200",
"sourceMaps": true,
"diagnosticLogging": true,
"webRoot": "${workspaceRoot}/dist",
"sourceMapPathOverrides": {
"webpack:///*": "/*"
}
},
{
"name": "Attach to Chrome, with sourcemaps",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"diagnosticLogging": true,
"webRoot": "${workspaceRoot}/src/app",
"sourceMapPathOverrides": {
"webpack:///*": "/*"
}
}
]
}