Install system dependencies:
brew install --cask mono-mdk dotnet-sdk godot-mono brew install mono
$ which dotnet msbuild mono /usr/local/bin/dotnet /Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
Start Godot and create a project (e.g.
Add a C# script to a node. This should generate
Editor > Editor Settings > Mono > Editor, so VSCode will be started when double-clicking script files.
Over to VSCode. Install the following extensions:
Open the project:
OmniSharp: Use Modern Net or add this to your settings.
Follow the prompts to restart OmniSharp.
At this point, IntelliSense should work for standard types and namespaces, e.g.
If it doesn't, open the Output view and look at the C# and OmniSharp Log sections, and try to fix the errors there.
Once basic IntelliSense is working, start Godot in a separate terminal.1
/Applications/Godot_mono.app/Contents/MacOS/Godot --path "$HOME/godot/hello" -e
Build in the top-right corner.
Switch back to VSCode,
Restart OmniSharp, and IntelliSense should work for Godot APIs like
Debugging seems to just work. Select
View: Show Run and Debug and click
Play in Editor on the left.
- Visual Studio Code and C# code completion and debugger for Godot (nice concise guide with screenshots, but some parts are outdated or have missing details)
- Official guide
msbuild, so this is just to ensure it is started in the appropriate environment. Alternatively, select
Godot Tools: Open workspace with Godot editorfrom the command palette after configuring the path to the editor in the workspace
settings.json, and this will be done for you in a terminal in VSCode.↩︎
In the status bar, you should see a flame icon indicating "OmniSharp server is running", and a "Connected" section indicating the GDScript language server (provided by Godot itself) is running. ↩︎