新增npm scripts命令

  1. "debug": "node --inspect=5858 ./node_modules/webpack/bin/webpack.js --config webpack.pro.js"

launch.json

  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name":"Npm",
  6. "type": "node",
  7. "request": "launch",
  8. "runtimeExecutable": "npm",
  9. "runtimeArgs": ["run", "debug"],
  10. "port": 5858
  11. }
  12. ]
  13. }

runtimeExecutable:程序的执行器
runtimeArgs:传入执行器的参数
port:监听的端口号