godotengine / godot-csharp-vscode

Debugger and utilities for working with Godot C# projects in VSCode
https://marketplace.visualstudio.com/items?itemName=neikeq.godot-csharp-vscode
MIT License
145 stars 27 forks source link

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

Open lunafoxfire opened 1 year ago

lunafoxfire commented 1 year ago

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.

KrunoSaho commented 12 months ago

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.

funny-cat-happy commented 11 months ago

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

KrunoSaho commented 11 months ago

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.

krisutofu commented 7 months ago

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).