Cannot connect debugger to Unity Editor in Rider

I’m trying to connect to the Unity Editor for debugging using Rider, but the connection keeps failing with this error:

9168749--1276190--Screenshot 2023-07-24 164120.png

“Unable to connect to Unity Editor. Please follow ‘Debug in the Unity Editor’ documentation.”

This occurs when I click the Debug icon in Rider, even if I explicitly select the Unity process.

Here are some facts:

  • I am using Windows 10 Pro, version 22H2

  • I am using Rider 2023.1.4

  • I am using Unity 2023.1.5f1

  • I am using version 3.0.24 of the Rider integration package

  • Closing and re-opening Rider, Unity, Unity Hub, and JetBrains Toolbox did not help.

  • Deleting all generated .csproj and .sln files did not help.

  • The Unity Editor is set to compile C# code in Debug mode.

  • Normal Unity integration works as expected (e.g. I can view asset references just fine).

  • Rebooting my computer worked around the issue.

1 Like

I’ve encountered this issue sporadically using the combination of Unity 2022.3.4F1 and the editor plugin version 3.0.24. The first time it occurred, I managed to fix it with a computer restart; after that, nothing seemed to help until I upgraded my Unity application to 2022.3.5F1.