Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

MonoDevelop 2.8.2 and Unity 3.5.6 debugging on iOS device possible?

Discussion in 'iOS and tvOS' started by lethardicus, Dec 10, 2012.

  1. lethardicus

    lethardicus

    Joined:
    Dec 10, 2012
    Posts:
    1
    So, I've looked everywhere and tried everything (maybe) trying to debug on device with MonoDevelop Unity 2.8.2 and Unity 3.5.6. I deploy my build to the device with xcode, stop it within xcode, open the application again on the device, and then I open up Monodevelop. I select attach to process, which detects the device just fine. However, it hangs and I eventually get this message:

    Mono.Debugging.Soft.DebugSocketException: Could not open port for debugger. Another process may be using the port. ---> System.Net.Sockets.SocketException: interrupted at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in :0 at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternal (System.Net.Sockets.Socket dbg_sock, System.Net.Sockets.Socket con_sock, System.Net.IPEndPoint dbg_ep, System.Net.IPEndPoint con_ep) [0x0002b] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs:274

    Port 10000 is supposedly the default port for remote debugging, however I've checked and else is running on this port. I'm NOT running MonoTouch. Just straight Monodevelop Unity version 2.8.2 and Unity 3.5.6. Is it even possible at all with these conditions to debug on device with Unity or did I miss something? I even tried a local Ad-Hoc connection between my Mac and the actual device to no avail. I'd appreciate any help on this. Thanks.
     
  2. danien

    danien

    Joined:
    Jun 16, 2009
    Posts:
    71
    I have never been able to get this to work either but I just noticed the following in the Xcode console:

    PlayerConnection initialized network socket : 0.0.0.0 55501
    Multi-casting "[IP] 10.128.87.221 [Port] 55501 [Flags] 3 [Guid] 2728303056 [EditorId] 3012262790 [Version] 1048832 [Id] iPhonePlayer(******s-iPhone) [Debug] 1" to [225.0.0.222:54997]...
    Waiting for connection from host on [10.128.87.221:55501]...
    Timed out. Continuing without host connection.
    Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56056
    PlayerConnection already initialized - listening to [10.128.87.221:55501]

    My router shows the local IP address of both the phone and Mac to be 192.168.*.* while the Unity runtime on the phone seems to use 10.*.*.* The Unity Editor's console shows "Failed to connect to player ip: 192.168.1.4, port: 55501", which is the IP of the phone.

    Could this be why the debugger fails to connect (and the "Another process may be using the port" message is just a red herring)? Is there a way to get the Unity runtime to use 192.168.*.* instead?
     
    Last edited: Aug 9, 2013
  3. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    I ran into a similar issue. The debug client on my phone kept using the 3G ip address instead of the wifi address. I turned off 3g and was able to connect to mono develop.