Bug 29897 - Breakpoints don't work when debugging on iOS device
Summary: Breakpoints don't work when debugging on iOS device
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.11 (C5)
Hardware: PC Windows
: Normal major
Target Milestone: 4.0.0 (C6)
Assignee: Bugzilla
Depends on:
Reported: 2015-05-08 20:20 UTC by Alina Popa
Modified: 2015-10-02 15:46 UTC (History)
14 users (show)

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

Solution file with breakpoints for repro (4.52 MB, application/x-zip-compressed)
2015-05-12 17:57 UTC, Dylan Kelly
IDE Logs (461.04 KB, application/x-zip-compressed)
2015-08-05 12:21 UTC, Mohit Kheterpal

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 Alina Popa 2015-05-08 20:20:33 UTC
When debugging on iPhone, sometimes the application stops in breakpoints, sometimes it doesn't. More precisely, it works the first time, then after stop debugging and start again, it no longer stops in breakpoint. The same breakpoints always work when using the iOS simulator.
Comment 1 codemanndeals 2015-05-11 17:57:59 UTC
I just installed Xamarin version 3.11.445.0, My iOS projects are not hitting breakpoints in referenced projects.
Comment 2 Dylan Kelly 2015-05-12 17:56:30 UTC
Steps to reproduce:
1. Open Attached Solution File on VS
2. Clean Solution
3. Build Solution
4. Deploy Solution to iPhone
5. Observe the breakpoint being hit
6. Step debugging
7. Deploy Solution to iPhone

Expected result:
Observe the breakpoint being hit

Actual result:
The breakpoint is not hit. The only way to hit the breakpoint again is to restart VS.


Build info: 

Microsoft Visual Studio Ultimate 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Ultimate

Xamarin   3.11.555.0 (f889ed9)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (850d16df32efd0d5b2819c42dc9884073b9ef19c)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS (4ef5acddd229f2115678f0886b173075eeb8350e)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 3 Dylan Kelly 2015-05-12 17:57:08 UTC
Created attachment 11178 [details]
Solution file with breakpoints for repro
Comment 4 Ian Ceicys 2015-05-12 19:19:31 UTC
Dylan here is the screencast I recorded with repro

Comment 5 Ian Leatherbury 2015-07-16 19:04:58 UTC
Possible duplicate of: https://bugzilla.xamarin.com/show_bug.cgi?id=28027
Comment 6 Mohit Kheterpal 2015-08-05 12:21:21 UTC
Created attachment 12369 [details]
IDE Logs

I have checked this issue with latest build of C5SR3 i.e. XVS 3.11.852 and XI and observed that this issue still exist i.e. breakpoint always hit when we deploy application on iphone simulator, and it hit only first time when we deploy application on device.

mtbserver log : https://gist.github.com/saurabh360/5b3745c2581c556a2785

Please let me know if I can provide more useful information from my side.
Comment 7 PJ 2015-09-02 13:40:12 UTC
Joaquin will be able to start taking a look at this one soon, hopefully utilizing the many improvements in our upcoming Cycle 6 release. This is not something that was able to be addressed in C5SR4. Updating milestone.
Comment 16 Miguel de Icaza [MSFT] 2015-10-02 15:46:21 UTC
Just to summarize the situation:

Currently the application on device will die if the app does not return from the "FinishedLaunching" method in the first 13 or 17 seconds.   This includes the debugger.

This is something that we want to address in our XAmarin.iOS product, and while we have attempted to fix this in the past, the fixes brought their own problems.