godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.54k stars 153 forks source link

godot 4.0stable debugger not working #460

Closed rkxhs02 closed 1 year ago

rkxhs02 commented 1 year ago

Godot version

godot 4.0 stable

VS Code version

1.762

Godot Tools VS Code extension version

Latest

System information

window10

Issue description

godot 4.0stable debugger not working

Steps to reproduce

The following error occurs when running gdscript godot debug run.

Failed to launch Godot instance: Error: Command failed: "D:\download\Godot_v4.0-stable_win64.exe" --path "D:\TestGame" --remote-debug 127.0.0.1:6006 '"D:\download\Godot_v4.0-stable_win64.exe"'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α׷�, �Ǵ� ��ġ ������ �ƴմϴ�.

Godot_v3.5.2-Stable works well.

Isn't 4.0 not yet supported?

DaelonSuzuka commented 1 year ago

It's not supported yet.

atirut-w commented 1 year ago

Isn't this a duplicate?

DaelonSuzuka commented 1 year ago

There's going to be a lot of duplicates of this issue until the feature is done.

atirut-w commented 1 year ago

Someone ought to pin the original issue then. Should help with the dupes to some degree.

Exerionius commented 1 year ago

Well 3.5.2 doesn't work either. Debugger do stop on debug points but doesn't let expect/edit any variables, and stepping/resuming just hangs the process until restarted.

DaelonSuzuka commented 1 year ago

Well 3.5.2 doesn't work either. Debugger do stop on debug points but doesn't let expect/edit any variables, and stepping/resuming just hangs the process until restarted.

As far as I'm aware, that behavior has always been inconsistent at best. Given the complexity of the system, the limited amount of time I can devote to this project, and the fact that I don't really use debuggers, personally.... Getting it working perfectly has not been a very high priority for me.

microBob commented 1 year ago

This may have already been discussed in another issue, but the "error" that it is failing on is that the launch command is formatted incorrectly.

Invalid debug host address, it should be of the form <protocol>://<host/IP>:<port>

The extension is only sending <IP>:<port> and is missing <protocol>://

You can kinda get around this by setting the address: property in launch.json to http://<IP> (i.e. http://127.0.0.1). It'll launch correctly, although the extension will interpret the info message from Vulkan as an error (I think it's just logging info and can be safely ignored).

moonraymurray commented 1 year ago

I was able to get it to run by putting ws:// infront of 127.0.0.1 - ws://127.0.0.1 I still get issues when it comes to trying to pause from the debugger in VS code and also step through not working. I am unsure as to how to hook in Debug Adapter server aswell.

JoeTortuga commented 1 year ago

This worked for me, but it ignores all the debug stops. I checked the debug was passing the right parameters per the Godot spec, it's just not actually respecting it.

newjbl commented 1 year ago

{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "GDScript Godot", "type": "godot", "request": "launch", "project": "F:/Godot/GodotPro/test_vscode", "port": 6005, "address": "127.0.0.1", "launch_game_instance": true, "launch_scene": false, "debugServer": 6006,

    }
]

}

add "debugServer":6006, it can be start the godot project by F5. but it ignores all the debug stops....

akien-mga commented 1 year ago

Duplicate of #389