我正在尝试调试一个非常复杂的使用Node调试器、浏览器预览和Chrome调试器的VSCode中的角9应用程序,调试器不断地引导我使用node_module内部代码,这让我发疯了。
我试过使用Browser Preview: Launch
和ng serve
使用此VSCode skipFiles配置,但是第一个仍然进入node_modules,而后者只是在取消调试过程之后才试图启动Chrome。(这似乎是一个与当前话题完全无关的问题,但如果你愿意的话,我希望你对此有任何看法)
我已经向browser-preview
扩展的制造者发送了一个问题,因为VSCode向我发出了skipFiles
的Property not allowed
警告。如果有人发现问题和/或对以下launch.json有建议,将不胜感激。
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "browser-preview",
"name": "Browser Preview: Attach",
"request": "attach"
},
{
"type": "browser-preview",
"request": "launch",
"preLaunchTask": "npm: start",
"name": "Browser Preview: Launch",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}",
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
},
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/",
"webRoot": "${workspaceFolder}",
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
],
"sourceMapPathOverrides": {
"webpack:/*": "${webRoot}/*",
"/./*": "${webRoot}/*",
"/src/*": "${webRoot}/*",
"/*": "*",
"/./~/*": "${webRoot}/node_modules/*"
}
}
]
}
编辑:我的目标是通过使用"Step Into ( (F11)“和"Step Over (F10)”逐行导航代码,并使用“继续(F5)”在需要时跳转到下一个断点,以避免断点垃圾处理__)。
发布于 2020-04-05 00:13:47
警告是一个类型记录级别的错误,它不会以任何方式影响编译。在使用以下依赖项集对其进行彻底测试之后,一切都按预期进行了工作:
"@types/node": "^13.7.7",
"@angular/cli": "^9.0.5",
"@angular/compiler": "^9.0.5",
"@angular/compiler-cli": "^9.0.5",
"ts-node": "^8.6.2",
"tslint": "^6.0.0",
"typescript": "^3.7.5",
...
https://stackoverflow.com/questions/60602819
复制相似问题