project.godot file). GDScript code intelligence and debugging come from the Godot editor itself: its language server and debug adapter run inside the editor, and OpenIDEA connects to them. Nothing has to be installed besides Godot.
Supported files
C# scripts in a Godot .NET project are handled like any other C# code; see C# and .NET.
Find the Godot executable
OpenIDEA looks for Godot in this order:- The executable chosen in Settings › Languages & Frameworks › Language Servers, entry godot (stored as
tools.godotin settings). - The search path, under the names
godot,godot4,godot-4,Godot,godot-monoandgodot4-mono. - Usual install locations:
- macOS:
Godot.app,Godot_mono.apporGodot 4.appin/Applicationsor~/Applications, and Steam. - Windows: Scoop, WinGet,
%LOCALAPPDATA%\Programs\Godot,Program Files\Godot, and Steam. - Linux: Flatpak (
org.godotengine.Godot), Snap (godot-4,godot), and Steam.
- macOS:
Code intelligence
The GDScript language server lives in the Godot editor and speaks LSP over TCP. When you open a.gd file, OpenIDEA:
- connects to
127.0.0.1:6005, Godot’s default language server port, if an editor is listening there; otherwise - starts a headless editor for the project (
godot --headless --editor --path <project> --lsp-port <free port>) and connects once it is ready. The first start imports the project and can take a while; OpenIDEA waits up to two minutes.
Run
For eachproject.godot at the project root or in a subfolder, OpenIDEA creates a Godot Project run configuration (named Godot Project (<folder>) for a subfolder). It runs godot --path . in that folder, which starts the project’s main scene.
To run one scene, right-click a .tscn file and run it, or open it and use Run › Run Context Configuration (⌃⇧R / Ctrl+Shift+F10). This runs godot --path . res://<scene>.
You can also add a Godot configuration in Run › Edit Configurations…. Its fields:
Debug
Debugging GDScript goes through the Godot editor’s debug adapter (DAP over TCP).- Debug a Godot configuration. OpenIDEA connects to an editor listening on
127.0.0.1:6006, Godot’s default debug adapter port. If none is running, it starts a headless editor for the project on a free port. The editor then plays the scene with its own run settings. A headless editor started this way ends with the debug session. - Attach to Godot. This configuration type (debug only, defaults
localhostand port6006) debugs the game the Godot editor is already running. Open the project in the Godot editor, play a scene (F5 / F6), then start the configuration. The port is set in Godot under Editor Settings › Network › Debug Adapter.
Godot matches scripts by their real path. OpenIDEA resolves symlinks in the project path before it sends breakpoints,
so a project opened through a symlinked folder (such as
/tmp on macOS) still stops at breakpoints.Open scripts from Godot
To make Godot open scripts in OpenIDEA, use Godot’s external editor setting (Editor Settings › Text Editor › External): turn on Use External Editor, set Exec Path to the OpenIDEA executable (on macOS, the executable insideOpenIDEA.app/Contents/MacOS/), and set Exec Flags to:
Limitations
- GDScript code intelligence needs a Godot 4 editor, either running or startable headless. There is no built-in GDScript analysis without it.
- Godot Shader and resource files have highlighting only.
- Debugging works through the editor’s adapter only; there is no debugging of exported builds.