vscode 配置全局的调试模式

    1. // https://medium.com/@jsilvax/debugging-webpack-with-vs-code-b14694db4f8e
    2. "launch": {
    3. "configurations": [
    4. {
    5. "type": "node",
    6. "request": "launch",
    7. "name": "es6: debug",
    8. // workspaceFolder 当前工作路径:当前文件所在的工作空间
    9. // 或者使用全局安装的 babel-node `npm i -g @babel/node @babel/core @babel/preset-env`
    10. "program": "${workspaceFolder}/test/index.js",
    11. // 改用 babel-node 执行, 而不是 node
    12. "runtimeExecutable": "babel-node",
    13. "skipFiles": [
    14. "<node_internals>/**"
    15. ]
    16. },
    17. {
    18. "name": "Launch Webpack",
    19. "program": "${workspaceFolder}/node_modules/webpack/bin/webpack.js",
    20. "request": "launch",
    21. "type": "node"
    22. }
    23. ]
    24. },