JetBrains / resharper-unity

Unity support for both ReSharper and Rider
Apache License 2.0
1.21k stars 131 forks source link

remote debugging on linux is not working #2434

Open tylerfan opened 3 months ago

tylerfan commented 3 months ago

i have a unity player running on another linux device(steamdeck), and i am trying to do some remote debugging on my ubuntu machine, but the device is not showing up on the process list and manually input the ip address of the steamdeck(which can be successfully ssh in) shows : " unable to connect to custom player. Please following "Debugging in Player" document.

I am wondering whether this is supported on linux?

citizenmatt commented 3 months ago

It should work. To appear in the list, the player needs to be on the same subnet, and firewalls need to let UDP broadcast messages leave the device and be received by the desktop machine. But it's more concerning that you can't connect manually, using the IP address and port. This might happen if the player has not been built with script debugging enabled, but other than that, there aren't many things we can try. How did you get the IP address and port to connect to? You should be able to find it in the player's log - can you share that line, please?

tylerfan commented 3 months ago

i used [SteamOS Devkit Client], and it shows the connected IP address and i could talk to steamdeck that way so the ip is definitely valid. the player is built with script debugging since i could do debugging locally with rider.

tylerfan commented 3 months ago

ok i switched to latest rider in snap store and i have to specify a port number given by selecting wait for managed debugging when building unity, and now it works for manual input.
it is weird that the latest rider has a another attach to process window which has 'local' 'remote' 'docker' tab. If i connect to the host with port 22, it could pass the connection test, but no process is shown. If I ask for port given by the unity process, the connection will get stuck, and won't pass a connection test. it also doesn't let me delete the configurations or update the previous configurations since the port number of the unity app changes everytime and i am basically increasing the list of configurations indefinitely there.

Rowanion commented 2 weeks ago

Bumping this. Same issue. I can connect through Rider on Win to the remote Steamdeck but there are no processes. Somewhere it complains about not seeing any dotnet procs, even though filtering is off and I would like to see all the processes on the deck.

citizenmatt commented 2 weeks ago

Unity debugging is based on a UDP broadcast message that gives information about the running players. This model doesn't match or fit the main "attach to process" dialog. The remote section in that dialog is looking for dotnet processes on a remote machine, but Unity is a custom process hosting Mono, so it won't show anything.

In order to debug Unity, you need to either be able to receive the UDP broadcast message which includes host and port details to connect the debugger to, or to enter the details manually, if UDP is being blocked or not reaching you (e.g. you're on a different subnet or on different sides of a router)