Skip to content

Configuring VSCode

Valk edited this page Sep 28, 2024 · 20 revisions

Visual Studio Code

  1. Install Visual Studio Code
  2. In VSCode > Open Folder > Template\GodotProject
  3. Install the extensions that should automatically get recommended to you

Create a launch.json with the following contents. Replace all program paths with the path to your Godot executable.

{
    "version": "0.2.0",
    "configurations": [
        // For these launch configurations to work, you need to setup a GODOT
        // environment variable. On mac or linux, this can be done by adding
        // the following to your .zshrc, .bashrc, or .bash_profile file:
        // export GODOT="/Applications/Godot.app/Contents/MacOS/Godot"
        {
            "name": "🕹 Debug Game",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "C:/Users/VALK-DESKTOP/Downloads/Godot_v4.3-stable_mono_win64/Godot_v4.3-stable_mono_win64.exe",
            "args": [],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "integratedTerminal"
        },
        // Debug the scene that matches the name of the currently open *.cs file
        // (if there's a scene with the same name in the same directory).
        {
            "name": "🎭 Debug Current Scene",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "C:/Users/VALK-DESKTOP/Downloads/Godot_v4.3-stable_mono_win64/Godot_v4.3-stable_mono_win64.exe",
            "args": [
                "${fileDirname}/${fileBasenameNoExtension}.tscn"
            ],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "integratedTerminal"
        },
        {
            "name": "🧪 Debug Tests",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "C:/Users/VALK-DESKTOP/Downloads/Godot_v4.3-stable_mono_win64/Godot_v4.3-stable_mono_win64.exe",
            "args": [
                // These command line flags are used by GoDotTest to run tests.
                "--run-tests",
                "--quit-on-finish"
            ],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "integratedTerminal"
        },
        {
            "name": "🔬 Debug Current Test",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "C:/Users/VALK-DESKTOP/Downloads/Godot_v4.3-stable_mono_win64/Godot_v4.3-stable_mono_win64.exe",
            "args": [
                // These command line flags are used by GoDotTest to run tests.
                "--run-tests=${fileBasenameNoExtension}",
                "--quit-on-finish"
            ],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "integratedTerminal"
        },
    ]
}
Clone this wiki locally