Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[SOLVED] Attaching debugger to iOS times out with "Could not connect to debugger"

Discussion in 'iOS and tvOS' started by MissingText, Jan 22, 2014.

  1. MissingText

    MissingText

    Joined:
    Oct 15, 2013
    Posts:
    11
    Hi all,

    I just spent a couple hours chasing down this problem. While searching for help I came across many issues with similar symptoms, but almost none that matched exactly what I was experiencing. Since the solution for me was not easy to come by, I thought I'd share.

    Issue:

    I'm on OSX attempting to remotely attach the MonoDevelop Unity Debugger to a build running on an iPhone 5. After running the build, the device's process appears in the list of processes to attach to in MonoDevelop, however the attempt to attach never succeeds after selecting it. After 20 seconds or so each attempt times out and produces no output in MonoDevelop other than a dialogue with the message "Could not connect to debugger".

    Solution:

    In the iOS device's Settings, open the Cellular menu and disable Cellular Data. Run the deployed app once again, and MonoDevelop will now be able to attach to the remote process almost immediately.

    I ended up finding the solution based on u3dxt's response in this thread: http://forum.unity3d.com/threads/16...-Unity-3-5-6-debugging-on-iOS-device-possible

    It appears that the device was attempting to make a connection using the cellular data connection/IP address rather than the WIFI one.

    Hopefully this can save some time for someone else who happens across this same issue.

    Cheers!
     
    abductor and eshan-mathur like this.
  2. d4Rk

    d4Rk

    Joined:
    Apr 25, 2013
    Posts:
    7
    Awesome! Really helped me out :)
    Was already trying to "debug" with debug logs as I just couldn't get the device connected.
     
  3. colab_dev1

    colab_dev1

    Joined:
    Aug 21, 2014
    Posts:
    2
    OMG That Totally Worked. :D:D:D Thank you!
     
  4. gooncorp

    gooncorp

    Joined:
    Dec 30, 2011
    Posts:
    131
    this is still a problem on pc builds i have not found a fix for it.
     
  5. MissingText

    MissingText

    Joined:
    Oct 15, 2013
    Posts:
    11
    What exactly are you trying to do gooncorp?
     
  6. tuanzi88

    tuanzi88

    Joined:
    Sep 10, 2015
    Posts:
    19
    @ruffen

    Hi Ruffen, I cannot find cellular in iOS 9. Do you have any idea how to deal with it with iOS 9 with Unity 5.2.0?
     
  7. MissingText

    MissingText

    Joined:
    Oct 15, 2013
    Posts:
    11
    As far as I can tell on my iPhone 6+ with iOS 9, the option hasn't really moved. Cellular is near the top of the Settings list.

    image.png
     
  8. pigiuz

    pigiuz

    Joined:
    Sep 2, 2015
    Posts:
    1
    this didn't work for me,
    actually by doing this I get the timeout message much earlier (1-3 seconds)...
    any clue?
     
  9. seanNovak

    seanNovak

    Joined:
    Aug 12, 2013
    Posts:
    12
    Same here. I'm using 5.4 beta (5.4.0f1) . Think that has anything to do with it?
     
  10. spider853

    spider853

    Joined:
    Feb 16, 2018
    Posts:
    42