Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0
. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
Visual Studio Code¶
Visual Studio Code is a free cross-platform code editor by Microsoft (not to be confused with Visual Studio).
Importing the project¶
Make sure the C/C++ extension is installed. You can find instructions in the official documentation. Alternatively, clangd can be used instead.
When using the clangd extension, run
scons compiledb=yes
.From the Visual Studio Code's main screen open the Godot root folder with File > Open Folder....
Press Ctrl + Shift + P to open the command prompt window and enter Configure Task.

Select the Create tasks.json file from template option.

Then select Others.

If there is no such option as Create tasks.json file from template available, either delete the file if it already exists in your folder or create a
.vscode/tasks.json
file manually. See Tasks in Visual Studio Code for more details on tasks.Within the
tasks.json
file find the"tasks"
array and add a new section to it:
{
"label": "build",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
// enable for debugging with breakpoints
"dev_build=yes",
],
"problemMatcher": "$msCompile"
}
{
"label": "build",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"dev_build=yes",
],
"problemMatcher": "$msCompile"
}

An example of a filled out tasks.json
.¶
Arguments can be different based on your own setup and needs. See Introduction to the buildsystem for a full list of arguments.
Debugging the project¶
To run and debug the project you need to create a new configuration in the launch.json
file.
Press