Remote debugger not working on Windows
Operating system or device - Godot version:
Godot.64bit 2.1 branch (9c8ecb45f8516a2) compiled on Windows 7 with MinGW-w64, 4.8.3
Issue description:
gdscript remote debugger cannot connect to editor:
Remote Debugger: Connection failed with status: 3'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 3'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 3'', retrying in 1 sec.
Remote Debugger: Unable to connect
Reverting IPv6 commits enables the debugger connection again. Local debugger is working. I have nothing configured for IPv6 support and never used it with Windows 7.
Related issue #7545
@Faless mmm, ping? :smiley:
@Faless mmm, ping? :smiley:
I'll have a look at it today.
@ktksgit can you try running godot from the command line (start -> run -> cmd):
cd C:\path\to\godot
godot.windows.tools.64.exe -path C:\path\to\project_folder
And post the messages in the windows command prompt before and after running the project with the debugger?
I think you mean running from editor? Just running the project does not start a network connection to the editor.
The project tries to connect to localhost, but only the status 3 == ERROR occurs.

(note: compiled without ssl)
I think you mean running from editor? Just running the project does not start a network connection to the editor.
Yes, thanks for the log! Sadly, I'm unable to reproduce. Can you check if the executable is somehow blocked by windows firewall? Happened to me once to debug for hours because of that. The socket seems to be created okay, and it's flags seems to be set correctly (otherwise the engine should spit other ERRORs and WARNINGs).
@ktksgit could you try this patch: https://patch-diff.githubusercontent.com/raw/godotengine/godot/pull/7554.diff and tell me if it works? So at least we know if it's related
could you try this patch
Or update your local branch, as the PR was merged.
PR changed the output to
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec. == StreamPeerTCP::STATUS_CONNECTING
:-)
- I increased the number of "tries" in ScriptDebuggerRemote::connect_to_host([...]) to a huge number == 30 Not connecting
- I increased the number of "tries" in ScriptDebuggerRemote::connect_to_host([...]) to a huge number == 30 and disabled Windows-Firewall It connects, but only after 8 tries/seconds. Not the implemented 3 tries.
- Changing just the files related to IPv6 from commit 5aac8eeb0f2f207b3b3e39440cfec89b568500ce to I think 24a440a34f0b83c6e385f08b9254fde8064a941a (change to the old windows socket implementation) It connects on the second try,
Hmm, what kind of misconfiguration or bug? touches the new socket implementation in my windows 7?
Well, it clearly shouldn't fail with STATUS_CONNECTING.
Also, why is there a difference between enabled and disabled windows firewall if the app itself is whitelisted? There should be no difference.
I'll have a look on why if might fail with STATUS_CONNECTING but I'm really baffled about this, and since I can't reproduce it it's hard to debug. It's a start though that something changed :man_dancing:
Okay, it seems that on your system it takes up to 8 seconds to pass from STATUS_CONNECTING to STATUS_CONNECTED. That sounds really strange :crying_cat_face:
Did some debugging: Address localhost resolves to IPv6 ::1, which gives the strange behaviour. So I changed the address in EditorRun::run([...]) from localhost to 127.0.0.1 => it's connecting (I could also change the mapping 127.0.0.1 localhost in C:\Windows\System32\drivers\etc\hosts)
So every workaround leads to force using IPv4. [because my system does not like IPv6 :-( ]
It looks like I have the same problem.
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec. Remote Debugger: Connection failed with status: 1'', retrying in 1 sec. Remote Debugger: Connection failed with status: 1'', retrying in 1 sec. Remote Debugger: Unable to connect
I'm on Windows 7, and this problem appeared for me in 2.1.2, the stable release, but it works fine on 2.1.1. I've checked firewall settings, it should not cause problems.
As a workaround: You can try to set the line: 127.0.0.1 localhost in C:\Windows\System32\drivers\etc\hosts.
It's indeed working this way, thank you. It now has the following line in the output, but it works after that.
Remote Debugger: Connection failed with status: 2'', retrying in 1 sec.
Using Windows 10 here. The bug shows up only when the machine is disconnected from the Internet.
At least on Windows 10, editing hosts didn't help. A comment in there hints that the setting might be ignored:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
#8179
Tested on Windows 10, and compiled on Windows Subsystem for Linux (Trusty Tahr) with x86_64-w64-mingw32-g++ (GCC) 4.8.2.
Worked around in #8179 for the 2.1 branch, but as mentioned on that PR it's not a complete fix. So keeping this issue open for 3.0.
I'm getting this under Linux
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Unable to connect
Apparently it doesn't work when IPv6 traffic is disabled through ip6tables (I disabled it to prevent VPN leaks). I tried to use IPv4 addressed from Editor Settings > Network, but I'm getting the same error.
Is this expected to be working on Windows 10 with 2.1.4? It's not.
Is this expected to be working on Windows 10 with 2.1.4? It's not.
@nanodeath it's partially broken, will be fixed in 2.1.5 (already merged in 2.1 branch), in the meantime, there is an easy workaround:
Changing "Editor Setting -> Network Host -> Debug Host" to 127.0.0.1 solved the issue in 2.1.4 stable. (Windows 10 x64)