vs code提示:
✅ This breakpoint was initially set in:
/Users/kevin/projects/chartdemo/src/chart.js
line 29 column 1
❓ We couldn't find a corresponding source location, but found some other files with the same name:
kevin
/projects/chartdemo
/src/chart.jsYou may need to adjust the webRoot
in your launch.json
if you're building from a subfolder, or tweak your sourceMapPathOverrides
.
运行的是一个最基础的index.html。
文件结构长这样:
-.vscode
-luach.json
-src/
-css/
-index.html
luach.json 如下:
- {
- // 使用 IntelliSense 了解相关属性。
- // 悬停以查看现有属性的描述。
- // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Launch Chrome",
- "request": "launch",
- "type": "chrome",
- "url": "http://localhost:5050",
- "webRoot": "${workspaceFolder}",
- "file": "${workspaceFolder}/index.html"
- },
- ]
- }
配置了file ,就是调试 本地的index.html ,但是就是无法命中断点,后来把url这个配置项注释掉就好了
看来url和file是有冲突的。