Bug 11344 - Cannot debug on target
Summary: Cannot debug on target
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 4.0.2
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2013-03-21 20:11 UTC by Jake Simpson
Modified: 2013-12-25 09:45 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jake Simpson 2013-03-21 20:11:32 UTC
I'm trying to run my app on the target (an Ipad Mini), however the debugger never connects to the actual target. The app is deployed ok (although takes forever for that to actually come up), and runs, but the debugger never connects, so I can't debug at all.
Comment 1 Jeffrey Stedfast 2013-03-21 21:36:08 UTC
Rolf: do you have any ideas about this one?
Comment 2 Jake Simpson 2013-03-21 23:31:55 UTC
More info - this is one fricken huge bundle. The debug bundle is 1.09g disc (all of the textures can't be compressed because they aren't power of 2).

I wonder if this might have something to do with it?
Comment 3 Rolf Bjarne Kvinge [MSFT] 2013-03-22 05:23:09 UTC
Can you add "-v -v -v" (without the quotes) to the additional mtouch arguments in the project's iOS Build options page, open the iOS Device Log (menu View -> Pads -> iOS Device Log), try again and get both the output from the device log as well as anything written to the application output?

It might have something to do with the size - one quick way to test if it's this particular project or not is to try a new project from a template to see if you can debug that.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2013-03-22 05:25:47 UTC
We also have a few hints on how to handle large assets while debugging: http://blog.xamarin.com/handling-large-assets-on-ios/
Comment 5 Jake Simpson 2013-03-22 14:03:54 UTC
So not sure what to say to this.

Today I basically reverted my project to the Pre Provision version, reset up the provisioning, and now I can debug.

Apparently Xamarin Studio doesn't like Thursdays? (Although, who does?)

Seriously, I don't know what was going on there. Although if I hit this once, chances are I will hit it again.

OH! Note - I did upgrade from 4.0.2 to 4.0.3 - would there be fixes in 4.0.3 for this kind of stuff?
Comment 6 Jeffrey Stedfast 2013-03-22 14:36:49 UTC
I don't think there was anything that would fix this in Xamarin Studio itself. Was Xamarin.iOS updated?
Comment 7 Rolf Bjarne Kvinge [MSFT] 2013-03-25 07:35:55 UTC
AFAIK nothing has changed that might affect this in any recent release.

So I'm closing this for now, if it shows up again please get the information from comment #3 and reopen. Thanks!
Comment 8 Jake Simpson 2013-04-04 14:09:56 UTC
More information.

This is almost certainly size related. I've reduced my bundle from 1.1g to 316m and now it -never- happens.

The deployment still takes a long time, but the debugger comes up all the time now.
Comment 9 Rolf Bjarne Kvinge [MSFT] 2013-04-04 18:17:14 UTC
Does anything change if you switch between USB and WiFi debugging in the debugger preferences (Xamarin Studio's menu -> Preferences -> Projects/Debugger/iPhone Debugger -> toggle the only checkbox there)?
Comment 10 Jake Simpson 2013-04-05 14:26:50 UTC
Actually, I need to correct myself. Today it's started happening a hell of a lot. I tried rebooting my entire machine and it just WILL NOT connect to my ipad mini.

It deploys and starts up the app ok, but it just will not connect the debugger.

NOTE - I've just discovered I have to reboot the target device when this occurs.

However, when this _does_ occur, it puts the IDE in a state where I can no longer affect breakpoints - either setting them or unsetting them (please see bug 11621 for more specifics).
Comment 11 Rolf Bjarne Kvinge [MSFT] 2013-04-05 18:33:23 UTC
Could you get the diagnostic information from comment #3 and comment #9?
Comment 12 Jeffrey Stedfast 2013-08-05 12:47:03 UTC
this sounds like a bug that was fixed (had to do with debugger ports iirc)
Comment 13 susanta sahu 2013-12-25 09:45:19 UTC
Run->Debug from the menu. Once the upload is complete, you will see this message: "Waiting for Debugger to connect" 

then you should manually launch the application on the device, it will connect to your Xamarin Studio and initiate debugging.

Breakpoints: It is important to point out that the iOS gives applications only a handful of seconds (10) to startup and complete the FinishedLaunching method in the Application delegate. If the application does not complete this method in 10 seconds, the OS will kill the process.

Guys please check that your FinishedLaunching execution completes with in 6-7 seconds, 

then it will start