Visual Studio Code

    • Make sure the C/C++ extension is installed. You can find instructions in the .
    • 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.

    ../../../_images/vscode_create_tasksjson.png

    • Then select Others.

    • Within the file find the "tasks" array and add a new section to it:

    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 Ctrl + Shift + D to open the Run panel.
    • If launch.json file is missing you will be prompted to create a new one.
    • Select C++ (GDB/LLDB). There may be another platform specific option here. If selected, adjust the configuration example provided accordingly.
    1. {
    2. "name": "Launch",
    3. "type": "cppdbg",
    4. "request": "launch",
    5. "program": "${workspaceFolder}/bin/godot.x11.tools.64",
    6. // Change the arguments below for the project you want to test with.
    7. // To run the project instead of editing it, remove the "--editor" argument.
    8. "args": [ "--editor", "--path", "path-to-your-godot-project-folder" ],
    9. "stopAtEntry": false,
    10. "cwd": "${workspaceFolder}",
    11. "externalConsole": true,
    12. "MIMode": "gdb",
    13. "setupCommands": [
    14. "description": "Enable pretty-printing for gdb",
    15. "text": "-enable-pretty-printing",
    16. "ignoreFailures": true
    17. }
    18. ],
    19. "preLaunchTask": "build"
    20. }

    ../../../_images/vscode_2_launch.json.png

    An example of a filled out launch.json.

    The name under program depends on your build configuration, e.g. godot.x11.tools.64 for 64-bit X11 platform with enabled.