VSCode debug exits on reload

Hi,

does anyone have a working launch.json for VSCode? This one works but if I change anything in the code, the process exists and I have to relaunch meteor (which takes a lot of time).

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Meteor: Chrome",
      "url": "http://localhost:3000",
      "webRoot": "${workspaceFolder}"
      // "outputCapture": "std"
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Meteor: Server",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run", "debug"],
      "restart": true,
      "stopOnEntry": false,
      "sourceMaps": true,
      "protocol": "inspector",
      "outputCapture": "std",
      "port": 9229,
      "timeout": 90000
    }
  ],
  "compounds": [
    {
      "name": "Meteor: All",
      "configurations": ["Meteor: Server", "Meteor: Chrome"]
    }
  ]
}

I generally run meteor from the terminal with the --inspect flag set and tell VSCode to attach to the process. That way i can re-attach quickly after it restarts the server.

1 Like