在 vscode 调试(debug) vue js 代码的配置
作者:互联网
参考资料
https://vuejs.bootcss.com/cookbook/debugging-in-vscode.html
https://blog.csdn.net/yezonggang/article/details/110070915 按这个也不能进入断点,需要在 launch.json 加多1行
-
配置vue有源码,找到这个段即可,可能在 vue.config.js 或 webpack里面
configureWebpack: {
devtool: 'source-map',
}, -
vscode 能够调用的 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": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*",
"webpack:///src/*": "${webRoot}/*"
}
}
]
}
标签:src,vue,vscode,js,webRoot,webpack,https 来源: https://www.cnblogs.com/16win-cn/p/15584747.html