Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
JetBrains Rider
JetBrains Rider is a commercial JetBrains IDE for C++, C# and GDScript that uses the same solution system as Visual Studio.
Bemerkung
This documentation is for contributing to the game engine, not for using JetBrains Rider as a C# or GDScript editor. To code C# or GDScript in an external editor, see the C# guide to configure an external editor.
Projekt importieren
Tipp
Wenn Sie bereits Visual Studio als Haupt-IDE verwenden, können Sie dieselbe Solution-Datei in Rider verwenden. Rider und Visual Studio verwenden das gleiche Solution-Format, so dass Sie zwischen den beiden IDEs wechseln können, ohne die Solution-Datei neu erstellen zu müssen. Debug-Konfigurationen müssen geändert werden, wenn Sie von einer IDE zur anderen wechseln.
If you are starting from the scratch, please follow instructions, specifically:
Install all the dependencies.
Figure out the scons command for compiling to target a specific platform.
Provide scons with additional arguments to request a solution file generation:
Add vsproj=yes dev_build=yes to the scons command
The vsproj parameter signals that you want Visual Studio solution generated.
The dev_build parameter ensures the debug symbols are included, allowing to e.g. step through code using breakpoints.
Open the generated
godot.slnin Rider.
Bemerkung
Ensure that the appropriate Solution configuration is selected on the Rider toolbar. It affects resolve of the SDKs, code analysis, build, run, etc.
Kompilieren und Debuggen des Projekts
Rider comes with a built-in debugger that can be used to debug the Godot project. You can launch the debugger by pressing the Debug icon at the top of the screen, this only works for the Project Manager, if you want to debug the editor, you need to configure the debugger first.
Klicken Sie auf die Option Godot > Edit Configurations am oberen Rand des Bildschirms.
Ensure the following values for the C++ Project Run Configuration:
Exe Path :
$(LocalDebuggerCommand)Program Arguments:
-e --path <path to the Godot project>Working Directory:
$(LocalDebuggerWorkingDirectory)Before Launch has a value of "Build Project"
This will tell the executable to debug the specified project without opening the Project Manager.
Use the root path to the project folder, not project.godot file path.
Finally click on "Apply" and "OK" to save the changes.
When you press the Debug icon at the top of the screen, JetBrains Rider will launch the Godot editor with the debugger attached.
Alternativ dazu können Sie Run > Attach to Process verwenden, um den Debugger an eine laufende Godot-Instanz anzuhängen.
You can find the Godot instance by searching for
godot.editorand then clickingAttach with LLDB
Debug visualizers
Debug visualizers customize how complex data structures are displayed during debugging. For Windows "natvis" (short for "Native Visualization") built-in with Godot are automatically used. For other operating systems, similar functionality can be setup manually.
Please follow RIDER-123535.
Unit-Tests
Leverage Rider doctest support. Please refer to the instructions.
Profiling
Please refer to the profiling instructions.
Please consult the JetBrains Rider documentation for any specific information about the JetBrains IDE.
Known issues
Debugging Windows MinGV build - symbols are not loaded. Reported RIDER-106816.