I'm building a Xamarin.Forms / iOS app that is going to usually be used on the iPhone Plus but am unable to debug the app on this particular device.
I can run/debug my app on the iPhone Plus simulator (9.2) without a problem. I can also deploy it to a physical iPhone (9.2) and run/debug the app.
However, when I try to run/debug the app on a physical iPhone Plus (9.2 or 9.2.1), it shows the startup screen for about a minute and Xamarin Studio ultimately says "Could not connect to the debugger."
I've cleaned my app, trusted my developer account on the iPhone Plus, ran an empty app with the same identifier on the iPhone Plus, and am out of ideas of what else I can do here.
All I get in my Application Output is this - no errors, no exceptions, nothing...
Please ensure your device is connected...
Connected to: iPhone
Launching /private/var/mobile/Containers/Bundle/Application/AE7D7C5D-8D67-484C-A226-64AAF3584CDC/app.app -monodevelop-port 10000 -connection-mode usb
I'm running Xamarin Studio 5.10.1.
The only thing that I can think of that's significantly different is the iPhone Plus I'm using does not have cellular service. I'm not using this in my app (I am using GPS and mapping) but it's the only significant difference I can think of.
Any ideas, other than finding someone with another iPhone Plus I can borrow?
Chet
EDIT: Here is info from the iOS Debug log, most noticeably this:
Mar 2 10:45:38 iPhone SpringBoard[58] : Forcing crash report of
(reason: 1, description: biz.c2it.nlapp failed to launch after 20.00s
(launchIntent: foreground-interactive))
More log data:
[763] : About to launch process for bundle ID: biz.c2it.nlapp
Mar 2 10:45:18 iPhone SpringBoard[58] : SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Mar 2 10:45:18 iPhone SpringBoard[58] : SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Mar 2 10:45:18 iPhone kernel[0] : xpcproxy[764] Container: /private/var/mobile/Containers/Data/Application/4F3BFCE4-367A-4BE4-9238-4C72D3B0D42F (sandbox)
Mar 2 10:45:18 iPhone com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1 [763] : In completion handler, got pid for bundle id, pid: 764.
Mar 2 10:45:18 iPhone com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1 [763] : Got a connection, launched process /private/var/mobile/Containers/Bundle/Application/30765608-6DE7-4DB7-87ED-2B1EB746AF5D/NorthernLights.iOS.app (pid = 764).
Mar 2 10:45:18 iPhone com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1 [763] : 1 +0.000000 sec [02fb/0b07]: Disabling breakpoints and watchpoints, and detaching from 764.
Mar 2 10:45:18 iPhone com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1 [763] : 2 +0.000083 sec [02fb/0b07]: error: ::ptrace (request = PT_THUPDATE, pid = 0x02fc, tid = 0x3003, signal = -1) err = Invalid argument (0x00000016)
Mar 2 10:45:18 iPhone com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1 [763] : 3 +0.015529 sec [02fb/1b07]: error: ::read ( -1, 0x16e246a38, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Mar 2 10:45:18 iPhone com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1 [763] : Exiting.
Mar 2 10:45:18 iPhone mobile_installation_proxy[210] : 0x16e1bb000 handle_connection: Could not receive request from host.
Mar 2 10:45:18 iPhone com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1 [762] : 1 +0.000000 sec [02fa/0b07]: error: ::read ( 6, 0x16fdcac88, 1024 ) => 0 err = No such file or directory (0x00000002)
Mar 2 10:45:18 iPhone com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1 [762] : Exiting.
Mar 2 10:45:18 iPhone mobile_installation_proxy[210] : 0x16e087000 handle_connection: Could not receive request from host.
Mar 2 10:45:38 iPhone SpringBoard[58] : Forcing crash report of (reason: 1, description: biz.c2it.nlapp failed to launch after 20.00s (launchIntent: foreground-interactive))
Mar 2 10:45:38 iPhone diagnosticd[85] : error evaluating process info - pid: 764, punique: 764
Mar 2 10:45:38 iPhone SpringBoard[58] : Finished crash reporting.
Mar 2 10:45:38 iPhone com.apple.xpc.launchd[1] (UIKitApplication:biz.c2it.nlapp[0xd388][764]) : Service exited due to signal: Killed: 9
Mar 2 10:45:38 iPhone ReportCrash[765] : saved type '109_NorthernLights.iOS' report (24 of max 25) as /var/mobile/Library/Logs/CrashReporter/NorthernLights.iOS_2016-03-02-104538_iPhone.ips
I had a similar problem on my Mac running Xaramin Studio.
My solution was to go into File menu -> Project -> ${project_name}.iOS
The Project options window will open, under the Build section, select iOS Debug. There is a check box to "enable debugging", click on that, clean the project, rebuild, and now debugging worked for me.
User contributions licensed under CC BY-SA 3.0