【发布时间】:2017-05-26 15:28:08
【问题描述】:
我正在尝试使用 Chrome 调试器扩展在 Windows 7 下的 Visual Studio Code 中为 Angular CLI 生成的 Angular 4 项目设置断点。我收到错误消息:断点被忽略,因为找不到生成的代码
这是我的 tsconfig.json 文件
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2016",
"dom"
]
}
}
这是我的 launch.json 的内容
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceRoot}\\*"
}
},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"webRoot": "${workspaceRoot}"
}
]
}
【问题讨论】:
标签: angular visual-studio-code angular-cli