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

  • VSCode Version: version 1.41
  • OS Version: MAC

Steps to Reproduce:

  1. run debug through npm and port 9229
  2. Here is json
"configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch via NPM",
            "runtimeExecutable": "npm",
            "runtimeArgs": [
                "start"
            ],
            "envFile": "${workspaceFolder}/.env.development",
            "port": 9229
        },

here is response:

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

here are logs:

[20:39:47.869 UTC] Getting browser and debug protocol version via http://127.0.0.1:9229/json/version
[20:39:47.869 UTC] Discovering targets via http://127.0.0.1:9229/json/list
[20:39:47.870 UTC] HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9229
[20:39:47.870 UTC] There was an error connecting to http://127.0.0.1:9229/json/version : connect ECONNREFUSED 127.0.0.1:9229
[20:39:47.870 UTC] HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9229
[20:39:47.870 UTC] Discovering targets via http://127.0.0.1:9229/json
[20:39:47.871 UTC] HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9229
[20:39:48.075 UTC] Getting browser and debug protocol version via http://127.0.0.1:9229/json/version
[20:39:48.075 UTC] Discovering targets via http://127.0.0.1:9229/json/list
[20:39:48.076 UTC] HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9229
[20:39:48.076 UTC] There was an error connecting to http://127.0.0.1:9229/json/version : connect ECONNREFUSED 127.0.0.1:9229
[20:39:48.076 UTC] HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9229
[20:39:48.076 UTC] Discovering targets via http://127.0.0.1:9229/json
[20:39:48.076 UTC] HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9229
[20:39:48.280 UTC] Getting browser and debug protocol version via http://127.0.0.1:9229/json/version
[20:39:48.280 UTC] Discovering targets via http://127.0.0.1:9229/json/list
[20:39:48.281 UTC] HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9229
[20:39:48.281 UTC] There was an error connecting to http://127.0.0.1:9229/json/version : connect ECONNREFUSED 127.0.0.1:9229
[20:39:48.281 UTC] HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9229
[20:39:48.281 UTC] Discovering targets via http://127.0.0.1:9229/json

Does this issue occur when all extensions are disabled?: Yes/No

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

was this resolved? I am having a similar error now