Bug 54446 - Debugging project on iOS skips constructor
Summary: Debugging project on iOS skips constructor
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.5.0 (15.2)
Hardware: PC Windows
: Low normal
Target Milestone: 15.4
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2017-04-04 13:47 UTC by Rob Houweling
Modified: 2017-07-28 08:12 UTC (History)
8 users (show)

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


Attachments
repro project (206.55 KB, application/x-zip-compressed)
2017-04-05 10:59 UTC, Rob Houweling
Details


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:
Status:
VERIFIED FIXED

Description Rob Houweling 2017-04-04 13:47:39 UTC
Overview: 
When debugging the attached project, the app silently fails on the loading of the MainPage:
MainPage = new Repro.MainPage();


Steps to Reproduce: Run project from Visual Studio 2015, set breakpoint at line mentioned above, press F11 to enter the code, nothing happens.

Expected Results: Continue debugging in the MainPage constructor.

Build Date & Hardware: 04/04/2017, running on an iPhone SE with iOS 10.3 beta. Reproducable.

Additional Builds and Platforms: Bug doesn't take place on Android.

Additional Information: I tracked it down to setting the BindingContext of the Page to the static Model. If I change the initialization of the model to the constructor, it works. On Android it works as well.
Despite the fact that this is not the best programming in the world ;), this shouldn't die silently.

Visual Studio 2015: 14.0.25431.01 Update 3
Xamarin 4.3.0.795
Xamarin.iOS 10.6.0.9

Repro project is attached. If more info is required, please let me know.
Comment 1 Manuel de la Peña [MSFT] 2017-04-05 10:01:59 UTC
Hello,

It looks like the project was not attached. Could you please try again attaching it to the bug report.
Comment 2 Rob Houweling 2017-04-05 10:59:17 UTC
Created attachment 21202 [details]
repro project

Here you go. It didn't attach the first time because it was to big but I guess I missed the error report. I removed the packages and bin/obj folders.
Comment 3 Timothy Risi 2017-05-08 23:51:40 UTC
Hi Rob,

Does this happen if you try to run the project from Xamarin Studio or Visual Studio for Mac on a mac machine as opposed to Visual Studio in windows?  I just loaded up the repro project and am unable to reproduce the bug.  I'm also on a newer version of Xamarin.iOS (10.8.0.175), so if you're still seeing the issue and haven't done so already, could you upgrade to the newer iOS version and see if you still see the issue?
Comment 4 Rob Houweling 2017-05-09 07:24:03 UTC
Hi Timothy,

It happens/happened ;) on Windows because I don't work on a Mac.
When I have some time I'll check and see if the newer version resolves the issue.
Comment 5 Timothy Risi 2017-05-11 23:51:17 UTC
Moving to the Visual Studio extension since it didn't reproduce on mac for me
Comment 6 Joaquin Jares 2017-05-22 13:38:18 UTC
I'll look into this as soon as possible.
Comment 7 Joaquin Jares 2017-05-26 17:35:15 UTC
I found a possible root cause. Still investigating.
Comment 8 Joaquin Jares 2017-07-17 16:44:27 UTC
This is fixed in the latest preview release. It was fixed as part of another issue that didn't have a Bugzilla bug (hang on the debugger with unhandled debugger exceptions).
Comment 9 Gaurav Ganorkar 2017-07-28 08:12:27 UTC
Verified this issue on latest build of d15-4 lane

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02046
Installed Version: Enterprise
Xamarin   4.7.0.826 (f6f2099)
Xamarin.Android   7.5.0.0 (bbf378a)
Xamarin.iOS   10.14.0.0 (38d3a2b)

Screencast link - https://www.screencast.com/t/lgrptWSM