4

see my screencast: https://youtu.be/JjtNrAR_bWM

it's very simple project with one script

public class TestDebugAndroid : MonoBehaviour
{
    // Use this for initialization
    void Start()
    {
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        var r = Application.platform;
        r = Application.platform;
    }
}

when i use rider > run > attach to unity process, I cannot find android emulator, and I find adb port from adb logcat with keyword "monooptions" and manually type this monooptions port, debug session cannot reach breakpoint enter image description here

and it raise:

Failed to connect: No connection could be made because the target machine actively refused it 127.0.0.1:56531
Unable to connect to 127.0.0.1
Please ensure that the player has 'Script Debugging' enabled and that the host '127.0.0.1' is reachable.

when i use visual studio > Debug > Attach to unity debugger, I can find android emulator device with same port in adb logcat, it work and can Find Android Player and debug session can reach breakpoint enter image description here

so I think I miss some step in rider or rider miss some code to find android player, how to fix it

chikadance
  • 3,591
  • 4
  • 41
  • 73

0 Answers0