Bug 17608 - Breakpoint does not get hit if user is using device having version 7.0 and above, when Xcode is set to below 5.0
Summary: Breakpoint does not get hit if user is using device having version 7.0 and ab...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.12.x
Hardware: PC Windows
: Normal normal
Target Milestone: 3.1
Assignee: Vinicius Jarina
Depends on:
Reported: 2014-02-05 06:21 UTC by narayanp
Modified: 2014-02-14 12:04 UTC (History)
8 users (show)

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 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:

Description narayanp 2014-02-05 06:21:49 UTC
Steps to reproduce:
1. Open VS.
2. Create or Open any iOS application.
3. connect with build host which is having Xcode below 5.0(Xcode 4.6.3 and 4.6.2 in my case)
4. Set breakpoint and debug the application on physical device having version 7.0 and above.
5. Tap manually application on device.

Actual Result: application deployed to device but when we manually tap on application, Breakpoint does not get hit. While using XS on MAC when we tap manually on application, breakpoint gets hit successfully.

Expected Result: Breakpoint should get hit.

Supplement info:
Error details: https://gist.github.com/saurabh360/e89cba49a4a645d4f489
Debug Output: https://gist.github.com/saurabh360/7e646fcea91665aa4f48
Xamarin Output: https://gist.github.com/saurabh360/63f0b0743a66fc4d4d18
Build Output: https://gist.github.com/saurabh360/2d420e11034cca1b5230
MTBServer Log: https://gist.github.com/saurabh360/73332a06e89002d48022

Environment details:
All Windows
VS 2013/2012/2010
Xamarin for VS 1.12.209

Regression Status: Same behavior happening with MTVS 1.10.39
Comment 2 PJ 2014-02-07 15:51:02 UTC
> I believe this a limitation with which debugging is handled in Visual Studio. Correct me if otherwise.

I don't think this is a limitation of Visual Studio itself. When something is working on XS and not working on VS, it's generally an issue with our extension (or at least a feature discrepancy).

As this is not a regression. I'll slate for 1.12+1.
Comment 3 Vinicius Jarina 2014-02-11 12:47:04 UTC
IIRC this is a limitation with how mtbserver handles debugging with old versions of Xcode.

I think we never implemented the "wait for user tap the Application on the device" like in the XS.

For now what we can do is warn the user to update the Xcode on his Mac, and say the Xcode version is too old for the device. (this is better then fail silently).

Comment 4 Alan McGovern 2014-02-11 15:32:36 UTC
just CC'ing rolf and seb to make sure this is the correct approach to take on the VS side, and if so we should do the same for XS.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2014-02-12 09:17:35 UTC
We don't really support using an Xcode+device combination which is not supported by Apple [1], so I'd say it would be perfectly fine to just show an error.

That said, the reason it works in Xamarin Studio is probably a mix of luck and old code not being removed:

* A long time ago (~2 years), MonoDevelop would write the ip:port it was listening for debugger connections to the app's Root.plist, and the app would read those at startup (after the user tapped on the app), and then connect to MonoDevelop.

* Then we added support for launching the app on the device automatically, and pass the ip:port as a command line argument to the app.

* However XS still creates the Root.plist file, and that's where the app will look if it didn't get any command line arguments (which happens when the user taps on the app).

* So the app will then connect to Xamarin Studio if XS is listening on the same ip:port which is in the Root.list (which isn't always the case anymore, the port is determined dynamically when the app starts as opposed to using a static port when the app is built).

The MTVS can probably replicate this by writing the proper information into the Root.plist file, but I'd just show an error message asking the user to fix their Xcode.

Note that if Xcode can deploy to a device while we show the MT1108 error mentioned below, it's a bug in mtouch and needs to be filed as such.

[1] The log shows this, which indicates this particular version of Xcode doesn't support the attached device:

warning MT1108: Could not find developer tools for this 7.1 (11D5134c) device. Please ensure you are using a compatible Xcode version and then connect this device to Xcode to install the development support files.
Comment 6 Vinicius Jarina 2014-02-14 12:04:04 UTC
Fixed: https://github.com/xamarin/XamarinVS/commit/cba096bf04d8431d6a8ddec73c0476c879bf6e74
mtbserver does not support "Tap to Debug"

If the user is running a old version of Xcode we will ask him to update the Xcode to a newer version.