Rider can't attach to unity process
Answered
When I click debug icon Rider starts a new Unity process, rather than attach to existing process. Rider can't find local Unity process as far as I can see in the "Searching for Unity editor and players" window. But if I enter local address and port of existing process, Rider will attach to it. Editor attaching in Unity preferences was checked. I reinstalled Rider and Unity several times, but it didn't help.
Rider version 2019.2.2. Unity 2019.1.7, 2019.2.9, 2019.3.0. Windows 10.
Please sign in to leave a comment.
Hello Vladimir,
The issue might be related to the following one: RIDER-34039, the main idea of which is that we terminate process listener too early. However, I would like to get a bit more details from you on behalf of Rider starting new Unity process. As far as I am aware, Rider only starts a new process when there is no Unity process started when we try to attach, otherwise Rider should attach to an already running process. It would be great if you could, for instance, provide a screencast demonstrating the issue. Thank you in advance!
FIRST: Trying to sign-in to this support forum was not straightforward and I'm surprised it worked at all. I disabled my VPN, disabled my privacy add-ons (Privacy Badger and Disable Javascript), and in Firefox's about:config I turn of CSP projection. Then I click on the "sign in to comment" link below, and select "JB" on the login page and I get and OAuth2.0 error... try it again and I get a slightly different error... I give up and come back to this page... and apparently now I'm logged in. Great.
SECOND: I just downloaded the latest and greatest version of Rider. I'm using Unity version 2019.4.18f1 which is a Long Term Support version. (I first tried Unity 2020.3 and the updated Rider package with much worse results than below).
I can upload a screencast, but what good will it do? It will show you exactly what is described. I do not believe I'm using it incorrectly.
"Attach to Unity Process" window says "Searching..." and never shows anything but the Editor.
I can launch a build of my game with Rider and debug, but I cannot attach to an existing process because it does not show in the Rider Editor. I am sure I checked "Development Build" and "Script Debugging" on the Unity build screen. I can attach to the Unity Editor and debug, but I need to be able to debug my builds., and I need to be able to attach to a running process because I don't always know ahead of time if I'll need to run the debugger at all. Make sense?
There are no firewalls active. I will upload a screencast if you really want. I'm really hoping I just forgot something simple, but I need Rider to work.... now that I depend on it for development.
As of Rider 2021.1, debugging players should work fine over wifi. However, there is a bug in USB support for iOS players in Rider 2021.1 on Mac/Linux (it worked fine in 2020.3). This will be fixed in Rider 2021.1.2 (see JetBrains/resharper-unity#2072).
There might still be issues listing players on Mac, however, and this is an operating system error and not something that Rider can easily fix. Turns out that macOS has two firewalls, that work mostly independently. If you disable the one in System Preferences, the other one might still be running, and it is this second packet filter firewall that has a default rule that can stop Rider from seeing Unity's players. Please see the firewalls section of this troubleshooting guide for more details and a workaround.
Thank you!!!! The troubleshooting guide worked. Sorry about the cross-post, I wasn't sure if this forum or the issue-tracker was more appropriate.