Godot .NET Tools
Generate .NET-related files for your Godot project in VSCode.
Install via the extensions marketplace by searching for:
Open the Command Palette (Ctrl + Shift + P) and select:
If the path to your Godot executable is not set in the user settings (More info), you will be asked to select the path to your Godot executable in a file dialog when generating the files.
The extension will generate 3 files inside the .vscode folder in the current workspace.
To be able to launch your project, you first need to set the path to your Godot executable in the user settings. The settings can be found under Extensions/Godot .Net.
Alternatively, you can set the executable path in your settings.json file:
The generated ruleset.xml file contains one rule ID:
This rule warns about encapsulating all your classes inside namespaces. In a Godot project this might not necessarily be wanted, so the rule is silenced by default.
For the ruleset to work, it is also added to the .csproj file.
The ruleset.xml file is of course not necessary and can be deleted if it's not wanted, but if it is, the .csproj file will need to be edited to resolve any issues related to omnisharp.
Simply remove the line shown below.
If the ruleset.xml is not desired at all, there is a configuration setting available to disable it's generation completely. More info
Launching and debugging
Open the debug view in your VSCode workspace and there should now be 3 options available.
You will now be able to set break points, enabling you to step through your code after launching your project.
There are 4 available configuration settings for the extension which enable you to set your Godot executable path and choose what files are generated:
These configurations are available in the user settings under Extensions/Godot .NET.
You can also add and edit them in your settings.json file.