Vscode-js-debug: WSL2 chrome debug with Error running browser: connect ECONNREFUSED 127.0.0.1:53579

Created on 29 Apr 2021  路  4Comments  路  Source: microsoft/vscode-js-debug

Describe the bug
WSL2 chrome debug not possible, browser opens for a moment then closes, with messege:

Error running browser: connect ECONNREFUSED 127.0.0.1:53579

To Reproduce
Steps to reproduce the behavior:

  1. On windows 10, install WSL2
  2. Install VSCODE (insiders or stable)
  3. Try debug javascript

launch.json:

  {
        "name": "Launch Chrome",
        "request": "launch",
        "type": "pwa-chrome",
        "url": "http://localhost:5000",
        "trace": true,
        "webRoot": "${workspaceFolder}"
      },

Log File
vscode-debugadapter-00e1f992.json

Vscode -> 1.56.0-insider
Javacript Debugger (Nightly) v2021.4.2617

Additional context
Curiously installing older versions of the javascript debugger also give the same error, even versions 3 months old
Also installing older versions of Debugger for chrome and Remote WSL also fails with the same error

bug verified

Most helpful comment

As far as i can tell it's fixed and working as intended, @connor4312 great job, thank you!

All 4 comments

same isssue here with same vscode version and js debug version.

I could not reproduce this before, but for some reason tonight I could. It seems there's some latency (in WSL?) before the port is available to connect to. We'll now retry for 5 seconds which seems to fix this issue for me.

This'll be in the VS Code release next week, and Insiders tomorrow. Please try it out and let me know if you still hit this.

Verifier: easiest way is to:

  1. Open any folder in WSL2
  2. Use the Debug: Open Link command
  3. Verify the browser attaches successfully

As far as i can tell it's fixed and working as intended, @connor4312 great job, thank you!

Was this page helpful?
0 / 5 - 0 ratings