vscode中调试, sourceMapPathOverrides的映射规则 , 下文有调试器匹配了两个 , 不知道为什么 {
// 使用 Edge 浏览器调试
"name": "Launch Edge",
"request": "launch",
"type": "msedge",
// "type": "firefox",
// 使用 Chrome 浏览器调试
// "type": "chrome",
// "runtimeExecutable": "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe",
// "runtimeExecutable": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
// 项目的访问地址(需要改成你项目开发环境对应的地址和端口号)
"url": "http://localhost:80",
// "runtimeArgs": [
// "--remote-debugging-port=9222"
// ],
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*",
},
},{✅ This breakpoint was initially set in:
G:\ui\nan_hai\src\api\zjf\shigongdanwei.js line 22 column 1
❓ We couldn't find a corresponding source location, but found some other files with the same name:
G:/ui/nan_hai/webpack-internal:///src/api/zjf/shigongdanwei.js
g:/ui/nan_hai/src/src/api/zjf/webpack:/src/api/zjf/shigongdanwei.js
You may need to adjust the webRoot in your launch.json if you're building from a subfolder, or tweak your sourceMapPathOverrides.}
暂无