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

Please indicate in the extension Readme that Godot 4 is not supported

Open lunafoxfire opened this issue 1 year ago • 4 comments

Currently the readme says that the requirements are "Godot 3.2.2 or greater. Older versions of Godot are not supported."

I've spent about 3 hours uninstalling and reinstalling all combinations of Godot, .NET Frameworks, and extensions trying to figure out why node path autocompletion (as well as the VSCode launch config) is not working, when most sources I can find say it should just work. After reading through some issues on this repo, it turns out, this extension just doesn't support Godot 4. Tbh that would have been nice to know 3 hours ago.

Thank you.

lunafoxfire avatar Oct 08 '23 17:10 lunafoxfire

For Godot 4.2 beta 4: launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "godot",
            "args": [],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "internalConsole"
        }
    ]
}

tasks.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "dotnet build ${workspaceFolder}/MyGodotProject.csproj -c Debug -v normal -p:GodotTargetPlatform=windows",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always"
            },
            "problemMatcher": "$msCompile"
        }
    ]
}

I rename the default Godot binary into Godot.exe, and add that folder to my Path, otherwise replace 'godot' with the binary path.

This lets me launch and debug with breakpoints within VS Code.

I no longer have this extension installed.

KrunoSaho avatar Nov 02 '23 04:11 KrunoSaho

this extension https://github.com/williamoberg/godot-dotnet-tools works for my godot 4.2 stable.

funny-cat-happy avatar Dec 04 '23 01:12 funny-cat-happy

this extension https://github.com/williamoberg/godot-dotnet-tools works for my godot 4.2 stable.

The point is that you do not need it anymore. Getting breakpoint activations with VSCode and .NET works fine without any plugins.

KrunoSaho avatar Dec 04 '23 01:12 KrunoSaho

As of now, the trick with coreclr only works for Windows. I could not get debugging to work for Linux binaries of Godot (it runs the program but the interaction with VSCode won't work). That means, a debugger extension for Godot 4+ is pretty much desirable except if there really is an existing solution that also works on Linux(-like) systems (not talking about a single distro).

krisutofu avatar Mar 20 '24 11:03 krisutofu