运行preLaunchTask后,Vscode永远卡住

时间:2019-07-12 20:48:16

标签: webpack visual-studio-code nodemon

我正在运行npm脚本后尝试附加调试器,但它是:

webpack --env.NODE_ENV=development --config config/webpack.config.js --watch

我正在使用nodemon-webpack-plugin来完成这一部分:

new WebpackNodemonPlugin({
  watch: path.resolve(paths.distServer),
  script: path.resolve(paths.distServer),
  nodeArgs: ['--inspect=9229'],
})

脚本和插件运行正常,但是完成任务后,我想附加流程,任务是:

{
  "version": "2.0.0",
  "tasks": [
  {
    "label": "start",
    "script": "start",
    "type": "npm",
    "problemMatcher": []
   }
 ]
}

我的启动配置:

{
  "type": "node",
  "request": "launch",
  "name": "Launch Program",
  "cwd": "${workspaceFolder}",
  "program": "${workspaceFolder}/src/server/index.js",
  "preLaunchTask": "start",
  "sourceMaps": true,
  "outFiles": ["${workspaceFolder}/dist/**/*.js"],
  "port": 9229
}

谢谢。

0 个答案:

没有答案