Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9229)

I am trying to set up VSCode to debug an npm script.

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch via NPM",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run-script", "test"],
      "port": 9229
    }
  ]
}

But I am getting this error:

Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9229).

like image 506
Matt Avatar asked Oct 17 '22 07:10

Matt


1 Answers

There's a known bug in 2.0.1-beta.31 for node functions. Please try adding "NODE_OPTIONS": "--inspect=5858" to your local.settings.json file as a workaround.

like image 69
Pankwood Avatar answered Oct 20 '22 03:10

Pankwood