skip to Main Content

Debugging with Firefox in VS Code suddenly stopped working on Windows, launching or attaching the debugger always results in error message connect ECONNREFUSED ::1:6000.

Tried deleting all VSCode related configuration and cache files and re-install latest VSCode in user mode, installed latest Firefox Developer Edition and tried debugging with default profile and non-persistent profile to see if the problem lies elsewhere.

Tried different debugger launch configurations.

None of this had any effect and problem still persists.

2

Answers


  1. Chosen as BEST ANSWER

    UPDATE


    You might not need to setup port proxy with the command from original solution if you use this setting in your attach configuration as mentioned by some people:

    "host": "127.0.0.1"
    

    Also breakpoints don't work for some reason.

    Issue seems related to VSCode update 1.82.

    Original solution


    Resolved on my own by redirecting port 6000 from IPv6 loopback to IPv4 loopback.

    For microsoft windows:

    Open windows terminal or command line as administrator and type command

    netsh interface portproxy add v6tov4 listenaddress=::1 listenport=6000 connectaddress=127.0.0.1 connectport=6000
    

    If you use different port for debugging don't forget to substitute it in the command.

    I found out you have to start Firefox with argument -start-debugger-server 6000 and use attach launch configuration like below in VS Code in order for it to work correctly if debugger stops launching after setting up proxy...

    {
        "name": "Attach Firefox",
        "type": "firefox",
        "request": "attach",
        "webRoot": "${workspaceFolder}",
    }
    

  2. I had the same error after updating to 1.82.2. I eventually discovered I was using the "Debugger for Firefox" extension, which I had forgotten about.

    When I checked the settings for the extension, they were all blank.

    I added a value in Firefox:Executable & Firefox:Port (Note: this was 6000, not 4200)

    This fixed it for me, but I do not know if this was just my settings disappearing, or if the update changed the way the blank settings were handled.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search