• Stars
    star
    1,517
  • Rank 30,896 (Top 0.7 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 8 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

Godot development tools for VSCode

Godot Tools

A complete set of tools to code games with Godot Engine in Visual Studio Code.

IMPORTANT NOTE: Versions 1.0.0 and later of this extension only support Godot 3.2 or later.

Features

The extension comes with a wealth of features to make your Godot programming experience as comfortable as possible:

  • Syntax highlighting for the GDScript (.gd) language
  • Syntax highlighting for the .tscn and .tres scene formats
  • Full typed GDScript support
  • Optional "Smart Mode" to improve productivity with dynamically typed scripts
  • Function definitions and documentation display on hover (see image below)
  • Rich autocompletion
  • Display script warnings and errors
  • Ctrl + click on a variable or method call to jump to its definition
  • Full documentation of the Godot Engine's API supported (select Godot Tools: List native classes of Godot in the Command Palette)
  • Run a Godot project from VS Code
  • Debug your GDScript-based Godot project from VS Code with breakpoints, step-in/out/over, variable watch, call stack, and active scene tree

Showing the documentation on hover feature

Download

To install from GitHub Releases or a development build, see Install from a VSIX in the Visual Studio Code documentation.

Available commands

The extension adds a few entries to the VS Code Command Palette under "Godot Tools":

  • Open workspace with Godot editor
  • Run the workspace as a Godot project
  • List Godot's native classes

Settings

Godot

If you like this extension, you can set VS Code as your default script editor for Godot by following these steps:

  1. Open the Editor Settings
  2. Select Text Editor > External
  3. Make sure the Use External Editor box is checked
  4. Fill Exec Path with the path to your VS Code executable
    • On macOS, this executable is typically located at: /Applications/Visual Studio Code.app/Contents/MacOS/Electron
  5. Fill Exec Flags with {project} --goto {file}:{line}:{col}

VS Code

You can use the following settings to configure Godot Tools:

  • editor_path - The absolute path to the Godot editor executable. Under Mac OS, this is the executable inside of Godot.app.
  • gdscript_lsp_server_port - The WebSocket server port of the GDScript language server.
  • checkStatus - Check the GDScript language server connection status.

GDScript Debugger

The debugger is for GDScript projects. To debug C# projects, use C# Tools for Godot.

To configure the GDScript debugger:

  1. Open the command palette:
  2. >Debug: Open launch.json
  3. Select the Debug Godot configuration.
  4. Change any relevant settings.
  5. Press F5 to launch.

Configurations

Required

  • "project": Absolute path to a directory with a project.godot file. Defaults to the currently open VSCode workspace with ${workspaceFolder}.
  • "port": Number that represents the port the Godot remote debugger will connect with. Defaults to 6007.
  • "address": String that represents the IP address that the Godot remote debugger will connect to. Defaults to 127.0.0.1.

Optional

  • "launch_game_instance": true/false. If true, an instance of Godot will be launched. Will use the path provided in editor_path. Defaults to true.
  • "launch_scene": true/false. If true, and launch_game_instance is true, will launch an instance of Godot to a currently active opened TSCN file. Defaults to false.
  • "scene_file": Path relative to the project.godot file to a TSCN file. If launch_game_instance and launch_scene are both true, will use this file instead of looking for the currently active opened TSCN file.

Usage

  • Stacktrace and variable dumps are the same as any regular debugger
  • The active scene tree can be refreshed with the Refresh icon in the top right.
  • Nodes can be brought to the fore in the Inspector by clicking the Eye icon next to nodes in the active scene tree, or Objects in the inspector.
  • You can edit integers, floats, strings, and booleans within the inspector by clicking the pencil icon next to each.

Showing the debugger in action

Issues and contributions

The Godot Tools extension is an open source project from the Godot organization. Feel free to open issues and create pull requests anytime.

See the full changelog for the latest changes.

Building from source

Requirements

Process

  1. Open a command prompt/terminal and browse to the location of this repository on your local filesystem.
  2. Download dependencies by using the command npm install
  3. When done, package a VSIX file by using the command npm run package.
  4. Install it by opening Visual Studio Code, opening the Extensions tab, clicking on the More actions (...) button in the top right, and choose Install from VSIX... and find the compiled VSIX file.

When developing for the extension, you can open this project in Visual Studio Code and debug the extension by using the Run Extension launch configuration instead of going through steps 3 and 4. It will launch a new instance of Visual Studio Code that has the extension running. You can then open a Godot project folder and debug the extension or GDScript debugger.

FAQ

Why does it fail to connect to the language server?

  • Godot 3.2 or later is required.
  • Make sure to open the project in the Godot editor first. If you opened the editor after opening VS Code, you can click the Retry button in the bottom-right corner in VS Code.

Why isn't IntelliSense displaying script members?

  • GDScript is a dynamically typed script language. The language server can't infer all variable types.
  • To increase the number of results displayed, open the Editor Settings, go to the Language Server section then check Enable Smart Resolve.

More Repositories

1

godot

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

awesome-godot

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

godot-demo-projects

Demonstration and Template Projects
GDScript
5,567
star
4

godot-docs

Godot Engine official documentation
reStructuredText
3,655
star
5

godot-cpp

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

godot-blender-exporter

Addon for Blender to directly export to a Godot Scene
Python
1,154
star
7

godot-proposals

Godot Improvement Proposals (GIPs)
1,089
star
8

tps-demo

Godot Third Person Shooter with high quality assets and lighting
GDScript
972
star
9

godot-git-plugin

Git implementation of the VCS interface in Godot
C++
669
star
10

collada-exporter

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

godot-syntax-themes

Syntax themes for the Godot Engine script editor
397
star
12

godot-headers

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

FBX2glTF

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

emacs-gdscript-mode

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

godot-asset-library

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

godot-website

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

godot-csharp-visualstudio

Godot C# extension for Visual Studio
C#
234
star
18

build-containers

Godot engine build containers
Shell
207
star
19

webrtc-native

The official GDNative WebRTC implementation for non-html exports.
C++
205
star
20

godot-design

Visual design specific stuff for the godot engine
202
star
21

gdnative-demos

Demo projects for GDNative
Python
191
star
22

godot-old-gsoc-ideas

Old ideas for Google Summer of Code (no longer relevant)
165
star
23

godot-google-play-billing

Godot Android plugin for the Google Play Billing library
Java
146
star
24

godot-csharp-vscode

Debugger and utilities for working with Godot C# projects in VSCode
TypeScript
141
star
25

godot-ios-plugins

Objective-C++
128
star
26

godot-benchmarks

Collection of benchmarks to test performance of different areas of Godot
GDScript
121
star
27

godot-visual-script

VisualScript as a Godot Engine c++ module
C++
118
star
28

godot-cpp-template

Quickstart template for GDExtension development with Godot
Python
109
star
29

godot-3d-dodge-the-creeps

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

godot-build-scripts

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

godot-mono-builds

Mono build scripts for Godot
Python
56
star
32

godot-builds

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

godot-docs-l10n

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

godot-3d-platformer-demo

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

godot-tests

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

godot-interactive-changelog

An interactive tool to view a changelog for each version of Godot Engine
JavaScript
30
star
37

godot-monodevelop-addin

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

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
27
star
39

mousse

High quality 3D platform demo, designed to make the best use of Godot 4.0
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++
19
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
17
star
45

godot-editor-l10n

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

gdscript-tests

Tests for the GDScript module implementation
HTML
13
star
47

godot-showreel-voting

A Django app to review and vote videos
Python
12
star
48

godot-prs-by-file

JavaScript
12
star
49

.github

Godot community health files
10
star
50

community-map

Map of regional community locations, submit your community here
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-nir-static

C++
8
star
54

godot-benchmarks-results

Website to display godot-benchmarks results
6
star
55

godot-website-cover-generator

JavaScript
5
star
56

moltenvk-osxcross

Custom MoltenVK builds with `-fno-objc-msgsend-selector-stubs` to be compatible with osxcross
4
star
57

godot-question2answer

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

godot-docs-user-notes

User notes for the Godot Engine official documentation
4
star
59

issue-stats

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

discourse-theme

A custom Godot styled theme for discourse
SCSS
2
star