godot-vscode-plugin icon indicating copy to clipboard operation
godot-vscode-plugin copied to clipboard

Windows 11, "invalid debug host address" when when using debugger

Open Nodragem opened this issue 1 year ago • 6 comments

Godot version

4.2.1

VS Code version

1.85.2

Godot Tools VS Code extension version

2.0.0

System information

Windows 11

Issue description

The debugger does not work. It said it failed at running the command:

"C:\mypath\Godot_v4.2.1-stable_win64.exe" --path "C:\anotherpath\projects\rope-prototype" --remote-debug 127.0.0.1:6007

So I tried to run it in git bash to get the error message, which is: Invalid debug host address, it should be of the form <protocol>://<host/IP>:<port>

To run the following works:

"C:\mypath\Godot_v4.2.1-stable_win64.exe" --path "C:\anotherpath\projects\rope-prototype" --remote-debug 127.0.0.1://6007

The temporary solution I am using is to modify the debugger configuration so that port is set to //6007:

    "configurations": [
        {
            "name": "GDScript Godot",
            "type": "godot",
            "request": "launch",
            "project": "${workspaceFolder}",
            "port": "//6007", 
            "address": "127.0.0.1",
            "launch_game_instance": true,
            "launch_scene": false
        }
    ]

Hope that help!

Steps to reproduce

Try to run the debugger.

Nodragem avatar Jan 20 '24 18:01 Nodragem

host://port doesn't make any sense, and also isn't what the error message is saying to do. If anything you would want tcp://host:port. Therefore if you change anything you should change the address to tcp://127.0.0.1.

DaelonSuzuka avatar Jan 20 '24 21:01 DaelonSuzuka

Yep, it does not make much sense indeed... but the command does run! however, breakpoints don't seem to work. Based on your feedback, I tried "tcp://127.0.0.1", it runs too, but the breakpoints still don't seem to work. It might be a separate issue, I don't know.

Nodragem avatar Jan 21 '24 16:01 Nodragem

@Nodragem It looks to me like you aren't actually running v2.0.0 of this extension.

If you were using the latest version, the command that gets run would contain --remote-debug "tcp://127.0.0.1:6007" and not --remote-debug 127.0.0.1:6007.

Please double check that you have the new version installed.

Additionally, your launch configuration contains old fields that have been removed. Please try the new recommended minimal config:

{
	"name": "Launch",
	"type": "godot",
	"request": "launch"
}

DaelonSuzuka avatar Jan 23 '24 21:01 DaelonSuzuka

@Nodragem It looks to me like you aren't actually running v2.0.0 of this extension.

Worth noting that at least for me, the latest version available inside of vscode is v1.3.1, which it confirms as the latest update.

LiamWinterton avatar Feb 05 '24 19:02 LiamWinterton

2.0.0 is a longstanding update that hasn't been published yet, so you have to install the development build VSIX linked here: https://github.com/godotengine/godot-vscode-plugin?tab=readme-ov-file#download

Calinou avatar Feb 05 '24 19:02 Calinou

@Nodragem Are you still experiencing this issue with the released version of 2.0.0, from the marketplace?

DaelonSuzuka avatar Feb 28 '24 04:02 DaelonSuzuka