vscode 配置全局的调试模式
// https://medium.com/@jsilvax/debugging-webpack-with-vs-code-b14694db4f8e
"launch": {
"configurations": [
{
"type": "node",
"request": "launch",
"name": "es6: debug",
// workspaceFolder 当前工作路径:当前文件所在的工作空间
// 或者使用全局安装的 babel-node `npm i -g @babel/node @babel/core @babel/preset-env`
"program": "${workspaceFolder}/test/index.js",
// 改用 babel-node 执行, 而不是 node
"runtimeExecutable": "babel-node",
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Launch Webpack",
"program": "${workspaceFolder}/node_modules/webpack/bin/webpack.js",
"request": "launch",
"type": "node"
}
]
},