我正在使用System.Web.Optimization
默认捆绑程序 - 在本地禁用优化的情况下运行,并尝试将 VS Code 调试器连接到 chrome。
breakpoint ignored because target path not found
VS Code 正在与 chrome 对话 OK(我可以在 VS 代码中看到控制台输出),但是在尝试添加断点时我得到了
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:54330",
"webRoot": "${workspaceFolder}"
}
这是来自跟踪输出的示例行,读起来像是找到了文件
From target: {"method":"Debugger.scriptParsed","params":{"scriptId":"182","url":"http://localhost:54330/Scripts/angular/app/components/Product/productIndexController.js","startLine":0,"startColumn":0,"endLine":41,"endColumn":4,"executionContextId":2,"hash":"F699CE42A4E66A41179BFB42F8FB23B6ABB6F607","executionContextAuxData":{"isDefault":true,"frameId":"(F6D07DAAA333F34A41904700967EB515)"},"isLiveEdit":false,"sourceMapURL":"","hasSourceURL":false,"isModule":false,"length":1244}}
Paths.scriptParsed: resolved http://localhost:54330/Scripts/angular/app/components/Product/productIndexController.js to d:\redacted\Scripts\angular\app\components\Product\productIndexController.js. webRoot: d:\redacted
To client: {"seq":0,"type":"event","event":"loadedSource","body":{"reason":"new","source":{"name":"productIndexController.js","path":"http://localhost:54330/Scripts/angular/app/components/Product/productIndexController.js","sourceReference":1158}}}
设置断点时的日志:
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"setBreakpointsRequest","data":{"fileExt":".js"}}}
To client: {"seq":0,"type":"response","request_seq":10,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"verified":false,"line":7,"message":"Breakpoint ignored because target path not found","id":1002}]}}
输出样本.scripts
› http://localhost:54330/scripts/angular/lib/responsive-bootstrap-toolkit.js (d:\redacted\scripts\angular\lib\responsive-bootstrap-toolkit.js)
› http://localhost:54330/scripts/angular/lib/showdown.js (d:\redacted\scripts\angular\lib\showdown.js)
› http://localhost:54330/scripts/angular/polyfills/blob.js (d:\redacted\scripts\angular\polyfills\blob.js)