Bug 39320 - VS2015 stops debugger after iOS app is launched
Summary: VS2015 stops debugger after iOS app is launched
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: 4.2.0 (C8)
Assignee: Joaquin Jares
Depends on:
Reported: 2016-03-03 15:08 UTC by adrianknight89
Modified: 2017-06-03 12:08 UTC (History)
11 users (show)

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

Zip of Logs immediately after the incident (55.74 KB, application/x-zip-compressed)
2016-05-26 02:52 UTC, shanti.mohan@live.com
My VS & Xamarin Setup - Help > About (184.96 KB, image/jpeg)
2016-05-26 02:54 UTC, shanti.mohan@live.com
Debug Output window (526.87 KB, image/jpeg)
2016-05-26 02:55 UTC, shanti.mohan@live.com

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 adrianknight89 2016-03-03 15:08:17 UTC
Note that I have a Forms application.

I'm seeing this error at random times. When it starts happening, it happens consistently unless I restart VS. The issue is that when the app is launched, debugger stops with a message in the console:

Launching 'AppXiOS' on 'xyz's iPhone'...
Launched 'AppXiOS' successfully on 'xyz's iPhone'...
The app has been terminated.

iOS device keeps running the app, but VS has no connection to it anymore. I also created this thread: http://forums.xamarin.com/discussion/comment/183669#Comment_183669
Comment 1 Daniel Cazzulino 2016-05-10 19:54:28 UTC
Please provide the following information so we can diagnose the issue:

- Help | About Visual Studio (to know what versions you're using)
- Help | Xamarin | Zip Logs (right after the issue happens, while connected to the Mac)
- Full (Debug) Output Window contents right after the failure occurs

Please change the bug status to NEW again when the requested information is provided.

Thanks in advance!
Comment 2 shanti.mohan@live.com 2016-05-26 02:52:03 UTC
Created attachment 16104 [details]
Zip of Logs immediately after the incident

I have provided it in my comments separately.
Comment 3 shanti.mohan@live.com 2016-05-26 02:54:00 UTC
Created attachment 16107 [details]
My VS & Xamarin Setup - Help > About

Comments provided separately.
Comment 4 shanti.mohan@live.com 2016-05-26 02:55:02 UTC
Created attachment 16108 [details]
Debug Output window

This is same as what is reported by the original issue.
Comment 5 shanti.mohan@live.com 2016-05-26 03:02:39 UTC
Hi Dan,

I too have this issue and hence uploaded the data that you wanted.

I would like to mention my observations:
1. This issue occurs if,
    a) Start the debugger in VS.
    b) The app loads on to the iPhone.
    c) I do play with the app and also observe values at few breakpoints.
    d) Then I press the Home button.
    e) Stop the debugger in VS.
    f) Restart the debugger in VS.
    g) The app is launched in iPhone and the DEBUGGER DETATCHES.

2. This doesn't happen if,
    a) I remove the app from the 'running / sleeping apps list' (by double tapping the Home and sliding up the app) and then restart the debugger.
    b) I stop the debugger in VS without tapping the Home button and then restart the debugger.

My phone is iPhone 6 running iOS 9.3.2 (13F69). After a long time this is the first time I debugged an app on the device after updating to Xamarin.Forms v2.2.0.31.

Comment 6 Daniel Cazzulino 2016-05-26 19:18:12 UTC
Assigning to @joj to investigate.

Comment 7 Joaquin Jares 2016-06-07 13:02:14 UTC
@shanti is your app crashing or is it just detaching the debugger, but running correctly?
Comment 8 shanti.mohan@live.com 2016-06-07 13:33:36 UTC
App doesn't crash. Debugger just gets detached.
Comment 9 Daniel Cazzulino 2016-06-28 18:18:19 UTC
In the forums, the following information may be useful for diagnosing the issue @joj: https://forums.xamarin.com/discussion/comment/206015/#Comment_206015
Comment 10 Joaquin Jares 2016-06-29 14:58:16 UTC
Trying a repro right now.
Comment 11 Joaquin Jares 2016-07-01 18:59:05 UTC
Fixed in master. Will be available soon.
Comment 12 Naveen Gali 2016-07-27 16:24:40 UTC
Is this fix available with latest stable version of Xamarin.Forms v ?
Comment 13 Ben Beckley 2016-07-28 20:19:38 UTC
Hello Naveen,

The fix does not live in Xamarin.Forms, and thus is not included in the latest stable release. However, it is in our Cycle 8 branch and targeted for that.
Comment 14 Naveen Gali 2016-07-28 20:22:54 UTC
@Ben Beckley,

Thanks for the response. When can we expect that release ?
Comment 15 Ben Beckley 2016-07-28 21:34:42 UTC

I can't provide a specific date, sorry. Currently we are looking at it being somewhere around a month away. This is subject to change pending many factors.

Although, we will be releasing Cycle 8 alpha, and later beta, builds which will have this fix.
Comment 16 Saurabh 2016-08-03 10:59:37 UTC
I am also able to reproduce this Issue with stable builds(XVS + XI using comment#5. This is the debug output: https://gist.github.com/danish360/1c4368d4aae1a5231400cc832393bdc6

I have checked the same with latest Cycle8 (XVS + XI and this is working fine now breakpoint hit everytime. This is the screencast for the same: http://www.screencast.com/t/ZpVDyhWOhj2f
Environment Info: https://gist.github.com/danish360/694687face1b9a1d08b9f7c047889c86
Comment 17 Thomas 2016-10-05 12:12:21 UTC
Is there any light at the end of the tunnel? I need to debug on device.

It first happened on an iPhone 3 when using the HockeyApp SDK. After updating to XCode 8, it also happens on an iPhone 5c.
Comment 18 noelicus 2017-06-03 12:08:56 UTC
Restarting the iPhone worked for me