2

When trying to debug on device using profile "Debug|iPhone > Casey's iPad" xamarin first shows this at the top:

Waiting for debugger to connect to Casey's iPad on port 10000 via USB...

Then it launches the app, show the splashscreen, and immediately crashes. About a minute later I get this popup:

Could not connect to the debugger

Debugging on the simulator works fine, and debugging on device in Xcode works, I just cannot debug on device in Xamarin.

I've tried the following things with no luck:

  1. Installed latest version of Xcode command line tools
  2. Build an objective-c hello world app in xcode, launch and debug on both device and simulator hoping Xcode would "wave the magic wand"
  3. Creating a new HelloWorld app and trying to debug it on device - the same thing happens
  4. Changing my USB port number to 10001
  5. Changed TestFlight code to only run if !DEBUG
  6. Changed my signing identity from Developer (Automatic) to my specific developer certificate

I'm using Xamarin Studio 5.10 and Xcode 7.1.1 on Mac OS X 10.11.1. I've tried just about anything I could find on Google and had no luck. Any suggestions?

Community
  • 1
  • 1
Casey Hancock
  • 508
  • 6
  • 19
  • Is the device registered on the apple developer portal? Are you using the correct provisioning profile? – valdetero Nov 27 '15 at 02:43

2 Answers2

3

Turns out I needed to do the following 2 things:

  1. Actually define the DEBUG symbol in the Project Options -> Compiler -> Define Symbols. I was using !DEBUG in my code but it wasn't ever defines. Once I did this the debugger would attach but breakpoints still were not being hit.
  2. Set Project Options -> Compiler -> Debug Information = full for all referenced libraries. Even though my main project had this set I still needed to set it for the referenced libs.
Casey Hancock
  • 508
  • 6
  • 19
0

Simply launching the app manually while the debugger is waiting fixed the problem.

I got this help from this page: https://forums.xamarin.com/discussion/comment/24010/#Comment_24010

Gautam Jain
  • 6,789
  • 10
  • 48
  • 67