diff --git a/development/cpp/configuring_an_ide.rst b/development/cpp/configuring_an_ide.rst index 72c13ac24..950774afc 100644 --- a/development/cpp/configuring_an_ide.rst +++ b/development/cpp/configuring_an_ide.rst @@ -14,6 +14,7 @@ Development Environment), here are setup instructions for some popular ones: - :ref:`Kdevelop ` (all desktop platforms) - :ref:`Xcode ` (macOS) - :ref:`Visual Studio ` (Windows) +- :ref:`Visual Studio Code` (all desktop platforms) It is possible to use other IDEs, but their setup is not documented yet. @@ -258,3 +259,42 @@ Test it: - Set a breakpoint in platform/osx/godot_main_osx.mm - It should break at the point! + + +.. _doc_configuring_an_ide_vscode: + +Visual Studio Code +------------------ + +- Ensure that C/C++ extension is installed. You can find instructions in `docs `_. + +- Now open cloned godot folder in VS Code (File > Open Folder...) + +In order to build the project, we need configurations files: *launch.json* and *tasks.json*. +To create them: + +- Open Debug view (Ctrl + Shift + D) and select cogwheel with orange dot: + +.. image:: img/vscode_1_create_launch.json.png + +- Select *C++ (GDB/LLDB)* (it might be slightly differently called on macOS or Windows) + +- Update *launch.json* to match: + +.. image:: img/vscode_2_launch.json.png + +(Note that *godot.x11.tools.64* in "program" value might be differently called on macOS or Windows) + +- Create *tasks.json* by starting Debug process (F5). VS Code will show dialog with *Configure Task* button. Tap it and select *Create tasks.json file from template*, then select *Others* + +- Update *tasks.json* to match: + +.. image:: img/vscode_3_tasks.json.png + +(Note that *platform=x11* will be different for macOX and Windows) + +- You can now start Debug process again to test that everything works. + +- If build phase fails, check console for hints. On Linux it's most likely that some dependencies are missing. Check :ref:`Compiling for X11 (Linux, \*BSD) ` + + diff --git a/development/cpp/img/vscode_1_create_launch.json.png b/development/cpp/img/vscode_1_create_launch.json.png new file mode 100644 index 000000000..eb1dbfae4 Binary files /dev/null and b/development/cpp/img/vscode_1_create_launch.json.png differ diff --git a/development/cpp/img/vscode_2_launch.json.png b/development/cpp/img/vscode_2_launch.json.png new file mode 100644 index 000000000..236518295 Binary files /dev/null and b/development/cpp/img/vscode_2_launch.json.png differ diff --git a/development/cpp/img/vscode_3_tasks.json.png b/development/cpp/img/vscode_3_tasks.json.png new file mode 100644 index 000000000..6806bb778 Binary files /dev/null and b/development/cpp/img/vscode_3_tasks.json.png differ