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.
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.
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}",
}
This is a bug and it is fixed in version 2.9.10.
Commit: https://github.com/firefox-devtools/vscode-firefox-debug/commit/c0a391de7b1a4b2468ada28e67fb4ad54d0dc671
Pull-Request: https://github.com/firefox-devtools/vscode-firefox-debug/pull/342/files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With