Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

Visual Studio Code

Visual Studio Code微软推出的免费跨平台代码编辑器(请勿与 Visual Studio 混淆)。


  • 确保已安装 C/C++ 扩展。你可以在官方文档中找到说明。或者也可以用 clangd 代替。

  • 使用 clangd 扩展时,请执行 scons compiledb=yes

  • 现在在VS Code中打开克隆的godot文件夹 文件 > 打开文件夹... .

  • Ctrl + Shift + P 打开命令提示符窗口,然后输入 Configure Task

  • 选择从模板中创建tasks.json文件选项.

  • 然后选择其他

  • 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.

  • tasks.json 文件中找到 "tasks" 数组, 并在其中添加一个新部分:

      "label": "build",
      "group": "build",
      "type": "shell",
      "command": "scons",
      "args": [
        // enable for debugging with breakpoints
      "problemMatcher": "$msCompile"