mirror of
https://github.com/godotengine/godot-csharp-vscode.git
synced 2025-12-31 21:48:32 +03:00
253cbf95220241eed4892d5e8842ee0d9165edd6
Separates the extension.ts code in multiple files and adds an asset generator code to provide the `tasks.json` and `launch.json` files (can be triggered manually with a command). - The build task generated uses the Godot CLI to build the solution (as described in #18), I think this is the cleanest solution since we let Godot handle the building of the project, but the user must configure the path to the Godot executable. - The Launch debug configuration is now created with the build `preLaunchTask` automatically so users won't have to set it up manually (fixes #18). - Adds snippets to `tasks.json` to add debug configuration easily after the file has been created. - Adds a command to generate the `tasks.json` and `launch.json` manually for convenience (asks the user if they want to override their current configuration first).
C# Tools for Godot
Debugger and utilities for working with Godot C# projects in VSCode.
Requirements
Godot 3.2.2 or greater. Older versions of Godot are not supported.
Features
- Debugging.
- Launch a game directly in the Godot editor from VSCode.
- Additional code completion for Node paths, Input actions, Resource paths, Scene paths and Signal names.
NOTES:
- A running Godot instance must be editing the project in order for
Play in Editorand the code completion to work. - Node path suggestions are provided from the currently edited scene in the Godot editor.
- Currently Signal suggestions are only provided using the information from the project build results, not from the information in the edited document. This will change in the future.
VSCode installation and configuration
- Install via extensions marketplace by searching for
neikeq.godot-csharp-vscode. - Once installed, you have to create the debug configurations from the Debug panel like this:

- Choose C# Godot

- It will generate the following. The
Play in Editoroption works out of the box. For the Launch you need to fix the path to point to the Godot Editor executable path you're using: !Fix editor path
Debugger launch configurations
By default the extension creates the following launch configurations:
- Play in Editor
Launches the game in the Godot editor for debugging in VSCode.
For this option to work, a running Godot instance must be editing the project. - Launch
Launches the game with a Godot executable for debugging in VSCode.
Before using this option, the value of the "executable" property must be changed to a path that points to the Godot executable that will be launched launched. - Attach
Attaches to a running Godot instance that was configured to listen for a debugger connection.
Screenshots
Languages
TypeScript
69.5%
C#
25.6%
Shell
1.9%
JavaScript
1.8%
Makefile
1.2%



