JetBrains Rider 2024.2 Help

Godot support

Support for Godot is based on the open-source Godot Support for Rider plugin. The plugin comes bundled with Rider, so manual installation is not required.

However, if you actively work with GdScript files, you can extend the feature set in these files even further with another plugin — GdScript supported by the community.

Get started

In most cases, JetBrains Rider is ready to work with Godot projects as soon as you install the Godot Engine on your machine.

There are several ways to open Godot projects in JetBrains Rider:

  • If the project only uses GdScript, select File | Open | Open from the main menu, choose the project folder, and click Select Folder.

  • If the project uses C#, select File | Open | Open from the main menu, and select the solution file .sln in the project folder.

  • Set JetBrains Rider as the default editor for C# scripts in the Godot editor. In this case, you can double-click C# files in the Godot editor views to open them in JetBrains Rider. To do so, in Godot editor menu, select Editor | Editor Settings | Dotnet | Editor and select JetBrains Rider and Fleet in External Editor.

  • In a similar way, you can set JetBrains Rider as the default GdScript editor on the Text Editor | External settings page.

    To find the location of JetBrains Rider executable, switch to Rider, go to Help | Diagnostic Tools | Special Files and Folders, and look for Installation home directory. On Windows, you need to point to bin/Rider64.exe. On macOS, you need to point to Rider's .app folder.

    In Exec Flags, specify the following: {project} --line {line} {file}.

Work with code

JetBrains Rider provides its renown code analysis, coding assistance, and code navigation features in C# and GdScript code in Godot projects.

Code analysis in GDScript is performed using the Godot Language Service via the LSP protocol. The Godot Language Service becomes available on your machine when you install the Godot Engine.

By default, JetBrains Rider establish the LSP connection with a running Godot editor. However, if you prefer to not have the Godot editor running, you can make Rider automatically start Godot LSP service in the background when needed. To do so, choose Automatically start headless LSP server in the LSP server connection: on the Languages & Frameworks | Godot Engine page of settings  Ctrl+Alt+S.

Run and debug

When you open a Godot project, JetBrains Rider automatically creates one or more run configurations that you can use to run and debug games. Debugging of Godot projects is performed via the Debug Adapter Protocol (DAP).

There are some differences in running Godot projects that only have C# code and projects that have GDScript or mixed GDScript/C# code.

Run and debug Godot projects with C# code

  1. If you are going to debug your project, prepare your session by setting breakpoints where necessary.

  2. Use the Player run configuration to launch your project. This configuration is created automatically when you open the Godot project

    JetBrains Rider: Launching Godot project
  3. Alternatively, you can launch a single scene from your Godot/C# project. To do so, right-click a scene file .tscn and choose Debug '[scene name].

Godot projects with GDScript code can be launched from JetBrains Rider only under the debugger. To run such projects without debugging, use the Godot editor.

Debug Godot projects with GDScript code

  1. Make sure that the Godot editor is running having the same project open.

    If it is not running, you can start it from JetBrains Rider by clicking the Godot icon on the toolbar and choosing Start Godot Editor:

    JetBrains Rider: Start Godot editor
  2. If you are going to debug your project, prepare your session by setting breakpoints where necessary.

  3. Use the Player GDScript run configuration to launch your project. This configuration is created automatically when you open the Godot project

Debug both GDScript and C#

  1. Start the debugging session with the Player GDScript configuration as described above.

  2. Press Ctrl+Alt+F5 or select Run | Attach to Process from the main menu.

  3. Select the desired Godot process in the list and click Attach with .NET Debugger.

Test and profile C# project

If you use the gdUnit4Net unit testing framework to in your C# Godot project, you can use the extensive features for unit testing.

To profile the performance and memory of a C# Godot project, click the three-dots menu next to the automatically created Player run configuration and choose the desired profiling type:

JetBrains Rider: Profiling Godot project

Fore more information, see the original pull request in the Godot engine.

Last modified: 18 August 2024