rider.rst 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. _doc_configuring_an_ide_rider:
  2. Rider
  3. =====
  4. `Rider <https://www.jetbrains.com/rider/>`_ is a commercial
  5. `JetBrains <https://www.jetbrains.com/>`_ IDE for C# and C++ that uses the same solution system as Visual Studio.
  6. Importing the project
  7. ---------------------
  8. .. tip:: If you already use Visual Studio as your main IDE, you can use the same solution file in Rider.
  9. Rider and Visual Studio use the same solution format, so you can switch between the two IDEs without rebuilding the solution file.
  10. Debug configurations need to be changed when going from one IDE to another.
  11. Rider requires a solution file to work on a project. While Godot does not come
  12. with the solution file, it can be generated using SCons.
  13. - Navigate to the Godot root folder and open a Command Prompt or PowerShell window.
  14. - Copy, paste and run the next command to generate the solution.
  15. ::
  16. scons platform=windows vsproj=yes dev_build=yes
  17. The ``vsproj`` parameter signals that you want Visual Studio solution generated.
  18. The ``dev_build`` parameter makes sure the debug symbols are included, allowing to e.g. step through code using breakpoints.
  19. - If you have Rider setup as your main IDE for .sln, you can now open the project by double-clicking on the ``godot.sln`` in the project root
  20. or by using the **Open** option inside of Rider.
  21. .. note:: Rider could fail to build the first time you open the project.
  22. If that is the case, you can close Rider and open the solution in Visual Studio, build it, close Visual Studio,
  23. and open the solution in Rider again. You are now able to build the project from Rider.
  24. Compiling and debugging the project
  25. -----------------------------------
  26. Rider comes with a built-in debugger that can be used to debug the Godot project. You can launch the debugger
  27. by pressing the **Debug** icon at the top of the screen, this only works for the Project manager,
  28. if you want to debug the editor, you need to configure the debugger first.
  29. .. figure:: img/rider_run_debug.webp
  30. :align: center
  31. - Click on the **Godot > Edit Configurations** option at the top of the screen.
  32. .. figure:: img/rider_configurations.webp
  33. :align: center
  34. - Delete what is under **Program arguments** and paste the following line:
  35. ::
  36. -e --path <path to the Godot project>
  37. This will tell the executable to debug the specified project without using the project manager.
  38. Use the root path to the project folder, not ``project.godot`` file path.
  39. .. figure:: img/rider_configurations_changed.webp
  40. :align: center
  41. - Finally click on apply and ok to save the changes.
  42. - You can now launch the debugger by pressing the **Debug** icon at the top of the screen and it will open the project to debug.
  43. Alternatively you can use **Run > Attach to Process** to attach the debugger to a running Godot instance.
  44. .. figure:: img/rider_attach_to_process.webp
  45. :align: center