Could Not Connect to Debugger

PaulReedyPaulReedy Paul ReedyUSMember

I'm unable to connect to any of my devices anymore. I can connect to my 5.1.1 iPod, the app runs, I can see messages in the console, but the "Connecting to Debugger" message never goes away, and eventually says "Could not connect to the Debugger".

I upgraded Monotouch/Monodevelop to no avail. Version info below. I did download the 6.1 beta on my ipad, and on that one, I get the same message but the app does not start. For the current test with 5.1.1, I'm using xcode 4.52 as you can see below. The xcode 4.6 is in a beta directory, so it's not being used for general development.

The problem did exist under 6.0.4 as well. I upgraded Monotouch to see if the error would go away.

MonoDevelop 3.0.5 Runtime: Mono 2.10.9 (tarball) GTK 2.24.10 GTK# (2.12.0.0) Package version: 210090011 Apple Developer Tools: Xcode 4.5.2 (1847) Build 4G2008a Monotouch: 6.0.6

Posts

  • RolfBjarneKvingeRolfBjarneKvinge Rolf Bjarne Kvinge USModerator, Xamarin Team Xamurai

    Try the following:

    • Restart your device.
    • Restart your Mac.
    • Switch between USB and WiFi debugging in MonoDevelop's Preferences (Debugger / iPhone Debugger page).

    If the issue still persists, get the following information:

    • First add "-v -v -v" to the additional mtouch arguments in the project's "iPhone Build" options page.
    • Open the iOS Device Log in MonoDevelop's menu (View -> Pads -> iOS Device Log) and connect.
    • Try to debug your app. Take note of everything printed to the Application Output and iOS Device Log pags in MonoDevelop and report back here with it.
  • PaulReedyPaulReedy Paul Reedy USMember

    I can now debug on my 5.1.1 ipod, but not my 6.0.0 iPhone

    Dec 14 13:06:53 iPhone-4S mobile_installation_proxy[13583] <Error>: 0x3b3f8b88 MobileInstallationSlowLookupBreak: MobileInstallationBrowse was called without specifying an options dictionary containing kLookupReturnAttributesKey. This usage is inefficient and may cause performance problems. Break on MobileInstallationSlowLookupBreak to debug.
    Dec 14 13:06:53 iPhone-4S mobile_installation_proxy[13583] <Error>: 0x3b3f8b88 MobileInstallationSlowLookupBreak: Existing options dictionary: <CFBasicHash 0x1d56c2b0 [0x3a7d2100]>{type = mutable dict, count = 1,
    entries =>
    0 : <CFString 0x851a0 [0x3a7d2100]>{contents = "RequestProxiedFor"} = <CFString 0x1d56c410 [0x3a7d2100]>{contents = "mtouch"}
    }
    Dec 14 13:06:59 iPhone-4S backboardd[52] <Notice>: ALS: SetDisplayFactor: factor=1.0000
    Dec 14 13:06:59 iPhone-4S backboardd[52] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
    Dec 14 13:06:59 iPhone-4S backboardd[52] <Notice>: MultitouchHID: detection mode: 255->3 (deferring until bootloaded)
    Dec 14 13:06:59 iPhone-4S backboardd[52] <Notice>: MultitouchHID: device bootloaded
    Dec 14 13:06:59 iPhone-4S backboardd[52] <Notice>: MultitouchHID: detection mode: 3->3
    Dec 14 13:06:59 iPhone-4S kernel[0] <Debug>: set_crc_notification_state 0
    Dec 14 13:06:59 iPhone-4S kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 1
    Dec 14 13:06:59 iPhone-4S kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 1 (set level to 0x5cf)
    Dec 14 13:06:59 iPhone-4S mobile_storage_proxy[13584] <Error>: 0x3b3f8b88 handle_lookup_image: Entry 2 of 4 does not have a disk image type
    Dec 14 13:07:00 iPhone-4S profiled[13586] <Notice>: (Note ) profiled: Service starting...
    Dec 14 13:07:00 iPhone-4S profiled[13586] <Notice>: (Note ) profiled: Recomputing passcode requirement message
    Dec 14 13:07:01 iPhone-4S MobileStorageMounter[13585] <Error>: Dec 14 13:07:01  SecTrustEvaluate  [leaf AnchorTrusted]
    Dec 14 13:07:01 iPhone-4S MobileStorageMounter[13585] <Error>: 0x3b3f8b88 verify_dimage_mount_path: Mount Path is NOT empty: /Developer/.TrustCache
    Dec 14 13:07:02 iPhone-4S MobileStorageMounter[13585] <Error>: 0x3b3f8b88 verify_dimage_mount_path: Mount Path is NOT empty: /Developer/Applications
    <snip...>
    Dec 14 13:07:02 iPhone-4S MobileStorageMounter[13585] <Error>: 0x3b3f8b88 perform_disk_image_mount: Could not verify the disk image mount path
    Dec 14 13:07:02 iPhone-4S MobileStorageMounter[13585] <Error>: 0x3b3f8b88 handle_mount_disk_image: The disk image failed to verify and mount
    Dec 14 13:07:02 iPhone-4S MobileStorageMounter[13585] <Error>: 0x3b3f8b88 handle_mount_disk_image: The disk image could not be verified
    Dec 14 13:07:02 iPhone-4S mobile_storage_proxy[13584] <Error>: 0x3b3f8b88 MobileStorageMount: Could not extract mount path from response message
    Dec 14 13:07:02 iPhone-4S mobile_storage_proxy[13584] <Error>: 0x3b3f8b88 handle_mount_image: Could not mount the disk image
    Dec 14 13:07:02 iPhone-4S mobile_storage_proxy[13584] <Error>: 0x3b3f8b88 main: Could not mount the image
    Dec 14 13:07:02 iPhone-4S mobile_installation_proxy[13589] <Error>: 0x3b3f8b88 MobileInstallationSlowLookupBreak: MobileInstallationBrowse was called without specifying an options dictionary containing kLookupReturnAttributesKey. This usage is inefficient and may cause performance problems. Break on MobileInstallationSlowLookupBreak to debug.
    Dec 14 13:07:02 iPhone-4S mobile_installation_proxy[13589] <Error>: 0x3b3f8b88 MobileInstallationSlowLookupBreak: Existing options dictionary: <CFBasicHash 0x1dd2b590 [0x3a7d2100]>{type = mutable dict, count = 1,
    entries =>
    0 : <CFString 0x481a0 [0x3a7d2100]>{contents = "RequestProxiedFor"} = <CFString 0x1dd2b6f0 [0x3a7d2100]>{contents = "mtouch"}
    }
    Dec 14 13:07:08 iPhone-4S com.apple.debugserver-189[13590] <Warning>: debugserver-189 for armv7.
    Dec 14 13:07:08 iPhone-4S kernel[0] <Debug>: lockbot[13582] Builtin profile: debugserver (sandbox)
    Dec 14 13:07:08 iPhone-4S com.apple.debugserver-189[13590] <Warning>: Connecting to com.apple.debugserver service...
    Dec 14 13:07:14 iPhone-4S mobile_installation_proxy[13593] <Error>: 0x3b3f8b88 MobileInstallationSlowLookupBreak: MobileInstallationBrowse was called without specifying an options dictionary containing kLookupReturnAttributesKey. This usage is inefficient and may cause performance problems. Break on MobileInstallationSlowLookupBreak to debug.
    Dec 14 13:07:14 iPhone-4S mobile_installation_proxy[13593] <Error>: 0x3b3f8b88 MobileInstallationSlowLookupBreak: Existing options dictionary: <CFBasicHash 0x1fd5eeb0 [0x3a7d2100]>{type = mutable dict, count = 1,
    entries =>
    0 : <CFString 0xcf1a0 [0x3a7d2100]>{contents = "RequestProxiedFor"} = <CFString 0x1fd5f010 [0x3a7d2100]>{contents = "mtouch"}
    }
    Dec 14 13:07:20 iPhone-4S com.apple.debugserver-189[13594] <Warning>: debugserver-189 for armv7.
    Dec 14 13:07:21 iPhone-4S kernel[0] <Debug>: lockbot[13582] Builtin profile: debugserver (sandbox)
    Dec 14 13:07:20 iPhone-4S com.apple.debugserver-189[13594] <Warning>: Connecting to com.apple.debugserver service...
    Dec 14 13:07:21 iPhone-4S com.apple.debugserver-189[13594] <Warning>: Got a connection, waiting for process information for launching or attaching.
    Dec 14 13:07:21 iPhone-4S com.apple.launchd[1] (UIKitApplication:com.companyname.appname[0x8fc8][13595]) <Warning>: (UIKitApplication:com.companyname.appname[0x8fc8]) Spawned and waiting for the debugger to attach before continuing...
    Dec 14 13:07:21 iPhone-4S com.apple.debugserver-189[13594] <Warning>: Got a connection, waiting for debugger instructions.
    Dec 14 13:07:21 iPhone-4S com.apple.debugserver-189[13594] <Warning>: 1 +0.000000 sec [351a/0303]: error: ::ptrace (request = PT_THUPDATE, pid = 0x351b, tid = 0x2503, signal = -1) err = Invalid argument (0x00000016)
    Dec 14 13:07:21 iPhone-4S com.apple.debugserver-189[13590] <Warning>: 1 +0.000000 sec [3516/0303]: error: ::read ( 5, 0x2fdcff0c, 1024 ) => 0 err = Bad file descriptor (0x00000009)
    Dec 14 13:07:21 iPhone-4S mobile_installation_proxy[13588] <Error>: main: Could not receive request from host.
    Dec 14 13:07:21 iPhone-4S mobile_installation_proxy[13592] <Error>: main: Could not receive request from host.
    Dec 14 13:07:21 iPhone-4S kernel[0] <Debug>: launchd[13595] Builtin profile: container (sandbox)
    Dec 14 13:07:21 iPhone-4S kernel[0] <Debug>: launchd[13595] Container: /private/var/mobile/Applications/03AD64CD-871B-41FE-AA64-56219276F126 (sandbox)
    Dec 14 13:07:21 iPhone-4S locationd[41] <Notice>: Location icon should now be in state 'Active'
    Dec 14 13:07:22 iPhone-4S appname[13595] <Warning>: HandleGPSLocationChanged
    Dec 14 13:07:22 iPhone-4S appname[13595] <Warning>: Closest location is now NEWLOCATION at 0.253185681351169 miles
    Dec 14 13:07:22 iPhone-4S appname[13595] <Warning>: HandleGPSLocationChanged
    Dec 14 13:07:22 iPhone-4S appname[13595] <Warning>: Closest location is now NEWLOCATION at 0.253185681351169 miles
    Dec 14 13:07:22 iPhone-4S awdd[13596] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
    Dec 14 13:07:22 iPhone-4S awdd[13596] <Error>: CoreLocation: CLClient is deprecated. Will be obsolete soon.
    Dec 14 13:07:32 iPhone-4S locationd[41] <Notice>: Location icon should now be in state 'Inactive'
    Dec 14 13:08:00 iPhone-4S profiled[13586] <Notice>: (Note ) profiled: Idled.
    Dec 14 13:08:00 iPhone-4S profiled[13586] <Notice>: (Note ) profiled: Service stopping.
  • RolfBjarneKvingeRolfBjarneKvinge Rolf Bjarne Kvinge USModerator, Xamarin Team Xamurai

    Can you deploy to that device with Xcode (also try again with MonoTouch if it works from Xcode, sometimes Xcode waves a wand and fixes stuff)?

  • foxxjnmfoxxjnm Jason Fox USMember

    Are you using TestFlight? If so comment out your TestFlight code then try again, I have had trouble with this in the past.

  • imkowimkow imkow USMember
    edited April 2013

    i have encountered almost the same problem, any idea what's wrong?

  • JohannesRudolphJohannesRudolph Johannes Rudolph DEMember

    Same issue here... Waiting for debugger to connect displayed in the Xamarin IDE but nothing ever happens....

    Here's my application output:' Please ensure your device is connected... Connected to: iDevPod01 Launching /private/var/mobile/Applications/BD4F2BFD-80D8-44AE-B435-0E4F4E6EC6D6/RowMotionBoatAppiOS.app -debugtrack -monodevelop-port 10000 -connection-mode usb '

    and here's the output from xcode organizers device console log - the Xamarin Ide didn't update properly (showed only messages from 1hr ago):

    https://gist.github.com/JohannesRudolph/5402797

  • BruceMcLeodBruceMcLeod Bruce McLeod AU

    I had this problem when debugging over USB. I tested both debugging over WIFI and from Xcode and that worked. As it turns out, the IP address listed at the bottom of this file ~/.config/MonoDevelop/MonoDevelopProperties.xml did not match the ip address that my DHCP server had given me. Once I aligned these (I set a static lease in my router so I always get the same one), it is now working.

    This feels like a bug where this ip address should be updated before the debugger starts.

    I hope this helps someone else who is having this problem.

  • RolfBjarneKvingeRolfBjarneKvinge Rolf Bjarne Kvinge USModerator, Xamarin Team Xamurai

    @BruceMcLeod: I believe you can remove that line completely from MonoDevelopProperties.xml, if it's present it will override the default logic (which is to find the current ip address).

  • BruceMcLeodBruceMcLeod Bruce McLeod AU

    @Rolf: Thanks. I'll test that.

  • RynoBurgerRynoBurger Ryno Burger USMember

    Hi, I'm having the same issue and tried Bruce's suggestion, problem is I don't have the following path: ~/.config/MonoDevelop..

    I poked around in the app bundle too but can't find any configuration files there either.

    Using Xamarin Studio 4.0.8 (build 2)

  • SeiferSeifer Alexey Sh UAMember

    Hi, I am experiencing the same issue. I cannot find MonoDevelopProperties.xml on my Mac.

  • Alexander.3849Alexander.3849 Alexander USMember
    edited August 2013

    I've done the next instructions:

    Restart device. Restart Mac. Switch between USB and WiFi debugging in MonoDevelop's Preferences (Debugger / iPhone Debugger page). Add "-v -v -v" to the additional mtouch arguments in the project's "iPhone Build" options page. Open the iOS Device Log in MonoDevelop's menu (View -> Pads -> iOS Device Log) and connect. Try to debug app. Take note of everything printed to the Application Output and iOS Device Log pags in MonoDevelop and report back here with it.

    But still got the same answer "Waiting for debugger to connect ...".

    Accidentally I have touched the app on device, it has launched and debugger has connected to device!

    So try to launch app manualy while debugger in waiting.

  • Alexander.3849Alexander.3849 Alexander USMember
    edited August 2013

    CalinTurcu has wrote right location of MonoDevelopProperties.xml in other thread: /Users/username/Library/Preferences/XamarinStudio-4.0/MonoDevelopProperties.xml

  • Alexander.3849Alexander.3849 Alexander USMember

    Another solution is to check "IOS Bundle Signing" for "Debug" configuration. You can debug only applications signed with developer certificate. To debug your application you should set in Identity "Developer:Dev Name" and corresponding certificate. I hope this helps someone.

  • AlexeySokolovAlexeySokolov Alexey Sokolov USMember

    Alexander, thanks! That helped to me

Sign In or Register to comment.