• Stars
    star
    129
  • Rank 269,262 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Debugger and utilities for working with Godot C# projects in VSCode

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 Editor and 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.

Multiple Project setup

If the current workspace contains multiple Godot projects, the extension will prompt you to select the one you want to use with the extension on opening the workspace in VSCode. The selected project can be changed anytime from the status bar or using the Select Project command.

  • Option 1. Using the status bar:

    • Click on the Godot project status bar item.
      Select Project on the status bar
    • Select the Godot project you want to use.
  • Option 2. Using the Select Project command:

    • Open the Command Palette (Ctrl + P).
    • Select C# Godot: Select Project.
      Select the Select Project command
    • Select the Godot project you want to use.

Setup debugging

To debug a Godot project you have to create the debugger launch configurations. It can be created from the Debug panel or by using the Generate Assets for Build and Debug command.

  • Option 1. Using the Generate Assets for Build and Debug command:

    • Open the Command Palette (Ctrl + P).
    • Select C# Godot: Generate Assets for Build and Debug.
      Select the Generate Assets for Build and Debug command
    • If debugger configurations already exist, you will be prompted if you want to override them.
    • It will have generated the launch.json and tasks.json files in the .vscode directory.
      See the debugger launch configurations, some configurations may require more setup.
  • Option 2. From the Debug panel:

    • If debugger configurations already exist, remove them or use the Generate Assets for Build and Debug command to override them.
    • Click on create a launch.json file.
      Create launch.json file
    • Select C# Godot.
      Select C# Godot
    • It will have generated the launch.json and tasks.json files in the .vscode directory.
      See the debugger launch configurations, some configurations may require more setup.

Additional Launch configuration

The Launch debugger configurations requires additional setup. The "executable" property must be set to a path that points to the Godot executable that will be launched. By default, the extension tries to automatically populate this property with the path to the running Godot instance but if there isn't one it needs to be set manually: Fix editor path

You can also set the godot.csharp.executablePath setting to the path that points to the Godot executable that will always be used when generating the debugger configurations so you won't have to set it manually everytime.

The generated debugger configuration will also create a tasks.json that contains a build task for building the project from VSCode which is used by the Launch configuration in order to build the project before launching (this is configured in the "preLaunchTask" property of the configuration and can be removed).

The build task uses the Godot executable to build the the C# project (this is configured in the "command" property and must be configured like the "executable" property of the Launch configuration if the extension could not find the right path). The build task can be modified to execute the dotnet command directly instead or modify the Godot CLI arguments.

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.
    This option requires the value of the "executable" property to be set to a path that points to the Godot executable that will be launched.
    The godot.csharp.executablePath setting can be configured to automatically populate the executable property with its value, if not configured it will be populated with the path to the running Godot instance if there is one, otherwise it will have to be populated manually. See additional Launch configuration.
  • Launch (Select Scene)
    Launches the game with a Godot executable for debugging in VSCode, allowing the user to select which scene to run on every execution.
    This option works just like the Launch option and also requires the value of the "executable" property to be set. See additional Launch configuration.
  • Attach
    Attaches to a running Godot instance that was configured to listen for a debugger connection.

Screenshots

Debugging

Nodes code completion

Input actions code completion

Signals code completion

More Repositories

1

godot

Godot Engine – Multi-platform 2D and 3D game engine
C++
81,838
star
2

awesome-godot

A curated list of free/libre plugins, scripts and add-ons for Godot
5,880
star
3

godot-demo-projects

Demonstration and Template Projects
GDScript
4,791
star
4

godot-docs

Godot Engine official documentation
reStructuredText
3,278
star
5

godot-cpp

C++ bindings for the Godot script API
C++
1,375
star
6

godot-vscode-plugin

Godot development tools for VSCode
TypeScript
1,356
star
7

godot-blender-exporter

Addon for Blender to directly export to a Godot Scene
Python
1,088
star
8

godot-proposals

Godot Improvement Proposals (GIPs)
998
star
9

tps-demo

Godot Third Person Shooter with high quality assets and lighting
GDScript
869
star
10

godot-git-plugin

Git implementation of the VCS interface in Godot
C++
603
star
11

collada-exporter

"Better" Collada exporter for Blender, orignally developed by the Godot Engine community
Python
410
star
12

godot-headers

Headers for the Godot API supplied by the GDNative module.
C
362
star
13

godot-syntax-themes

Syntax themes for the Godot Engine script editor
331
star
14

emacs-gdscript-mode

An Emacs package to get GDScript support and syntax highlighting.
Emacs Lisp
285
star
15

godot-asset-library

PHP frontend for Godot Engine's asset library
PHP
280
star
16

godot-website

The code for the official Godot Engine website. A static site built using Jekyll.
HTML
248
star
17

FBX2glTF

A command-line tool for the conversion of 3D model assets on the FBX file format to the glTF file format.
C++
248
star
18

godot-csharp-visualstudio

Godot C# extension for Visual Studio
C#
219
star
19

gdnative-demos

Demo projects for GDNative
Python
189
star
20

webrtc-native

The official GDNative WebRTC implementation for non-html exports.
C++
188
star
21

build-containers

Godot engine build containers
Shell
186
star
22

godot-design

Visual design specific stuff for the godot engine
184
star
23

godot-old-gsoc-ideas

Old ideas for Google Summer of Code (no longer relevant)
166
star
24

godot-google-play-billing

Godot Android plugin for the Google Play Billing library
Java
130
star
25

godot-ios-plugins

Objective-C++
112
star
26

godot-visual-script

VisualScript as a Godot Engine c++ module
C++
112
star
27

godot-benchmarks

Collection of benchmarks to test performance of different areas of Godot
GDScript
99
star
28

godot-3d-dodge-the-creeps

This project was moved to https://github.com/godotengine/godot-demo-projects/tree/master/3d/squash_the_creeps
GDScript
81
star
29

godot-build-scripts

Build scripts used for official Godot Engine builds with https://github.com/godotengine/build-containers
Shell
73
star
30

godot-cpp-template

Quickstart template for GDExtension development with Godot
Python
63
star
31

godot-mono-builds

Mono build scripts for Godot
Python
56
star
32

godot-3d-platformer-demo

3D platformer, developed as part of the Mozilla Grant 2019
44
star
33

godot-docs-l10n

Localization of the Godot documentation – Translations should be done on Weblate (see link)
Shell
42
star
34

godot-builds

Official pre-releases, dev snapshots, and custom builds of the Godot engine.
Python
36
star
35

godot-tests

Repository for Godot benchmarks, regression tests, etc.
GDScript
33
star
36

godot-monodevelop-addin

Godot Add-in for MonoDevelop and Visual Studio for Mac
C#
30
star
37

mousse

High quality 3D platform demo, designed to make the best use of Godot 4.0
24
star
38

godot-interactive-changelog

An interactive tool to view a changelog for each version of Godot Engine
JavaScript
24
star
39

godot-docs-project-starters

A collection of project templates and assets used by tutorials in the official Godot documentation. https://github.com/godotengine/godot-docs
GDScript
24
star
40

doc-status

Online Godot class reference status
JavaScript
21
star
41

godot-platform-haiku

Godot Engine platform port for the Haiku operating system // UNMAINTAINED, for reference / forks.
C++
20
star
42

webrtc-actions

A set of github actions to build WebRTC as a single static library.
18
star
43

regression-test-project

Godot engine regression test project
GDScript
17
star
44

godot-team-reports

Browse Godot PR backlog for each maintenance team
JavaScript
16
star
45

gdscript-tests

Tests for the GDScript module implementation
HTML
13
star
46

godot-editor-l10n

Localization of the Godot editor and class reference – Translations should be done on Weblate (see link)
Python
13
star
47

godot-prs-by-file

JavaScript
12
star
48

godot-showreel-voting

A Django app to review and vote videos
Python
11
star
49

community-map

Map of regional community locations, submit your community here
9
star
50

.github

Godot community health files
9
star
51

issue-bot

Issuebot for chat.godotengine.org
Python
8
star
52

godot-commit-artifacts

A tool providing quick links to latest CI builds of development branches
JavaScript
8
star
53

godot-question2answer

A repository hosting the current platform used at https://ask.godotengine.org
PHP
4
star
54

godot-docs-user-notes

User notes for the Godot Engine official documentation
4
star
55

issue-stats

Gather hardware and software information based on Godot GitHub issue reports
Python
3
star
56

godot-nir-static

C++
3
star
57

discourse-theme

A custom Godot styled theme for discourse
SCSS
2
star