Bug Report: Unity Editor Freezes with “Reloading Domain” Status During Debugging with JetBrains Rider
Environment
- JetBrains Rider: Version 2024.2.5
- Unity: Version 6000.0.32f1
Summary
When debugging a Unity project using JetBrains Rider, the Unity Editor consistently freezes with a “Reloading Domain” status after a few debugging iterations. This issue disrupts the typical debugging workflow, persists across application restarts, and requires a temporary workaround that is only effective for a limited number of debugging cycles.
Steps to Reproduce
- Open a Unity project in JetBrains Rider.
- In Rider, click “Attach to Unity Editor & Play” to initiate a debugging session.
- When a breakpoint is hit in Rider, stop the debugging session.
- Verify that the Unity Editor exits play mode as expected.
- Add additional breakpoints in the code, positioned before the previously hit breakpoint (as part of a standard debugging process).
- Repeat step 2 by clicking “Attach to Unity Editor & Play” again.
- Perform this debugging loop multiple times (e.g., 1-2 iterations).
Expected Behavior
The Unity Editor should seamlessly handle multiple debugging sessions without freezing.
The “Reloading Domain” process should complete quickly, allowing uninterrupted development and debugging.
Observed Behavior
- The debugging process functions correctly for the first 1-2 iterations.
- After a few cycles, the Unity Editor freezes indefinitely with a “Reloading Domain” status (tested for up to 10 minutes without resolution).
- Closing and reopening both Rider and the Unity Editor does not resolve the issue:
- Upon reopening the Unity Editor first and launching Rider (e.g., by double-clicking a script), the freeze occurs immediately on the first attempt to debug with “Attach to Unity Editor & Play”.
- Even without Rider attached, the Unity Editor independently becomes stuck in “Reloading Domain” when entering play mode.
- Repeatedly closing and reopening both applications fails to restore normal functionality.
Workaround
- In the frozen Unity Editor, select File > Save Project, then close the editor.
- Reopen both the Unity Editor and Rider.
- Debugging resumes working for 1-2 additional sessions before the freeze reoccurs.
Impact
- This issue results in significant productivity loss due to frequent freezes and the need to repeatedly apply the workaround.
- It severely disrupts the debugging workflow, hindering efficient code iteration and testing.
Additional Notes
- This behavior appears specific to the combination of JetBrains Rider and Unity, as similar workflows using other IDEs (e.g., VSCode for backend development) do not exhibit this issue.
- The persistence of the freeze across application restarts suggests a deeper underlying problem in the integration between Rider and Unity.
Request
Please investigate and address this issue to ensure a stable and reliable debugging experience for developers using JetBrains Rider with Unity. The current behavior significantly impacts development efficiency, and a permanent fix would greatly benefit the community.
Please sign in to leave a comment.
Since the first debugging session with Rider the “Compile Domain” process becomes super-slow for me. Sometimes gets fixed by Rider complete unloading, sometimes I have to reboot the system.
Anton, please follow the issue RIDER-120469 Unity gets stuck on domain reload when in debug mode using Rider to monitor progress. Regrettably, I cannot suggest any workarounds other than the one mentioned in the issue that helps in some cases.