visual_studio_code.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .. _doc_configuring_an_ide_vscode:
  2. Visual Studio Code
  3. ==================
  4. Visual Studio Code is a free cross-platform IDE (not to be confused with
  5. :ref:`doc_configuring_an_ide_vs`). You can get it
  6. `from Microsoft <https://code.visualstudio.com/>`__.
  7. - Make sure the C/C++ extension is installed. You can find instructions in
  8. the `documentation <https://code.visualstudio.com/docs/languages/cpp>`_.
  9. - Open the cloned Godot folder in Visual Studio Code with
  10. **File > Open Folder...**.
  11. In order to build the project, you need two configuration files:
  12. ``launch.json`` and ``tasks.json``. To create them:
  13. - Open the **Debug** view by pressing :kbd:`Ctrl + Shift + D` and select the
  14. cogwheel with an orange dot:
  15. .. image:: img/vscode_1_create_launch.json.png
  16. - Select **C++ (GDB/LLDB)** (it might be named differently on macOS or Windows).
  17. - Update ``launch.json`` to match:
  18. .. image:: img/vscode_2_launch.json.png
  19. If you're following this guide on macOS or Windows, you will have to adjust
  20. ``godot.linuxbsd.tools.64`` accordingly.
  21. - Create a ``tasks.json`` file by starting the Debug process with :kbd:`F5`.
  22. Visual Studio Code will show a dialog with a **Configure Task** button.
  23. Choose it and select **Create tasks.json file from template**, then select **Others**.
  24. - Update ``tasks.json`` to match:
  25. .. image:: img/vscode_3_tasks.json.png
  26. If you're following this guide on macOS or Windows, you will have to adjust
  27. ``platform=linuxbsd`` accordingly.
  28. - You can now start the Debug process again to test that everything works.
  29. - If the build phase fails, check the console for hints. On Linux, it's most
  30. likely due to missing dependencies. Check :ref:`doc_compiling_for_linuxbsd`.
  31. If you run into any issues, ask for help in one of
  32. `Godot's community channels <https://godotengine.org/community>`__.