Open lunafoxfire opened 1 year 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.
this extension https://github.com/williamoberg/godot-dotnet-tools works for my godot 4.2 stable.
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.
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).
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.