-
Notifications
You must be signed in to change notification settings - Fork 15
VSCode Setup
Valk edited this page Oct 25, 2022
·
1 revision
The built in Godot scripting editor is awful for C# scripting. VSCode is free software, I recommend you use that or JetBrains C# which is not free.
- Install VSCode (or VSCodium which is VSCode without the built-in telemetry)
- Required extensions to work with Godot
- C#
- C# Tools for Godot
- godot-tools
- Mono Debug
- Editor Config (not required but enforces projects indentation settings among other things) (you can use this .editorconfig I made specifically for VSCode with C#, it is different than the .editorconfig which currently exists in the repo which is for VS)
- Optional extensions that are useful to have
- C# XML Documentation Comments
- Roslynator
- Tokyo Night Theme (the theme I always use)
- MoonSharp Debug (only if debugging lua)
- Launch Godot through VSCode by hitting
F1
to open up VSCode command and rungodot tools: open workspace with godot editor
or simply click theOpen Godot Editor
button bottom right popup - Set
Godot > Editor > Editor Settings > Mono > Editor > External Editor
toVisual Studio Code
Note that you can add these files to exclude from your file view in VSCode (it makes the file structure on the left prettier) (I don't know where to paste this in VSCode as I manually edited this directly in the settings, if anyone figures out where please tell me!)
- Under
.vscode/
add launch.json and tasks.json files and replace all instances of<GODOT_PATH>
with the path to the Godot executable - Enable
Wait For Debugger
option inGodot > Project > Project Settings > Mono > Debugger Agent
- Use the
attach
VSCode configuration, set one or more breakpoints and launch Godot game to start debugging