소스 검색

Updating the instructions for C# debugging in Visual Studio Code (#6977)

* Updating the instructions for Visual Studio Code

Edited the instructions needed to make Visual Studio Code debugging work with Godot 4 - .net. Explained the situation with the not yet updated Godot c# extension for Visual Studio Code.

---------

Co-authored-by: Max Hilbrunner <[email protected]>
Co-authored-by: Raul Santos <[email protected]>
RedStainedInk 2 년 전
부모
커밋
a434971e4f
1개의 변경된 파일12개의 추가작업 그리고 8개의 파일을 삭제
  1. 12 8
      tutorials/scripting/c_sharp/c_sharp_basics.rst

+ 12 - 8
tutorials/scripting/c_sharp/c_sharp_basics.rst

@@ -108,20 +108,24 @@ In Godot's **Editor → Editor Settings** menu:
 In Visual Studio Code:
 
 - Install the `C# <https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp>`__ extension.
-- Install the `Mono Debug <https://marketplace.visualstudio.com/items?itemName=ms-vscode.mono-debug>`__ extension.
-- Install the `C# Tools for Godot <https://marketplace.visualstudio.com/items?itemName=neikeq.godot-csharp-vscode>`__ extension.
 
 .. note::
 
     If you are using Linux you need to install the `Mono SDK <https://www.mono-project.com/download/stable/#download-lin>`__
     for the C# tools plugin to work.
 
-To configure a project for debugging open the Godot project folder in VS Code.
-Go to the Run tab and click on **Add Configuration...**. Select **C# Godot**
-from the dropdown menu. Open the ``tasks.json`` and ``launch.json`` files that
-were created. Change the executable setting in ``launch.json`` and  command
-settings in ``tasks.json`` to your Godot executable path. Now, when you start
-the debugger in VS Code, your Godot project will run.
+To configure a project for debugging, you need a ``tasks.json`` and ``launch.json`` file in 
+the ``.vscode`` folder with the necessary configuration. An example configuration can be 
+found `here <https://github.com/godotengine/godot-csharp-vscode/issues/43#issuecomment-1258321229>`__ . 
+In the ``tasks.json`` file, make sure the ``program`` parameter points to your Godot executable, either by 
+changing it to the path of the executable or by defining a ``GODOT4`` environment variable that points to the
+executable. Now, when you start the debugger in Visual Studio Code, your Godot project will run.
+
+.. note::
+
+    There is also a `C# Tools for Godot <https://marketplace.visualstudio.com/items?itemName=neikeq.godot-csharp-vscode>`__ 
+    Visual Studio Code extension, that is meant to make this setup easier and to provide further useful tools.
+    But it is not yet updated to work with Godot 4.
 
 Visual Studio (Windows only)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~