Bug 31600 - [XVS] Unable to hit breakpoint in iOS Forms PCL project consistently
Summary: [XVS] Unable to hit breakpoint in iOS Forms PCL project consistently
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 3.11 (C5)
Hardware: PC Windows
: Normal normal
Target Milestone: 4.0.0 (C6)
Assignee: Ben Beckley
URL:
Depends on:
Blocks:
 
Reported: 2015-07-02 17:13 UTC by Ben Beckley
Modified: 2016-05-10 17:04 UTC (History)
5 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 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 Ben Beckley 2015-07-02 17:13:16 UTC
When deploying a Forms PCL project to a device, breakpoints are only being hit about half of the time. When they are missed it is because the app appears to crash to home screen, or runs successfully - just without hitting the breakpoint. In the latter scenario, when stopping the debugging session, this message is shown in the Output window.

>Warning: Socket 'VS debugger connection' failed, a lingering socket may remain open. The socket is not connected

Reproduction Steps:
1) Create Forms PCL project
2) Setup iOS startup project
3) Place breakpoint in App.cs at line 15
4) Deploy app to device
5) Observe if breakpoint is hit
6) Repeat steps 4 & 5, it seems to alternate between being hit and being missed

Also, this is not a regression from c5sr1 to c5sr2 as the same issue is apparent in both sets of releases.

c5sr1
XVS: 3.11.584
XI: 8.10.1.64

c5sr2
XVS: 3.11.666
XI: 8.11.0.861 (Not stable)
Comment 1 Jose Gallardo 2015-07-03 15:47:35 UTC
Hey Ben,

We were talking about this issue yesterday. It was hard to repro for us, and even Ian during our call tried at least 10 times in a row and the breakpoint was never missed.

We know the physical device debugging experience is still having some glitches, but can you please try with a little change on your repro steps and see if you can still repro the issue?

I would suggest the following steps:

1) Create Forms PCL project
2) Setup iOS startup project
3) Open "Configuration Manager" and ensure the PCL project also builds for iOS configuration.
4) Place breakpoint in App.cs at line 15
5) Deploy app to device
6) Observe if breakpoint is hit
7) Wait 10 seconds (give the debugging session time for closing).
8) Repeat steps 5, 6 & 7 several times.

Also, if you still can repro it as often as reported, please confirm if you get a similar behavior with cycle4 bits (3.9). I think as you said this is not a regression from SR1, but I think it's neither a regression from cycle4 bits.

Just in case, you can get the latest stable builds for Cycle4 from:
XVS (Windows):
http://download.xamarin.com/XamarinforVisualStudio/Windows/Xamarin.VisualStudio_3.9.547.msi
x.iOS (Mac):
http://download.xamarin.com/MonoTouch/Mac/monotouch-8.9.1.3.pkg


Thanks!
Comment 2 Ben Beckley 2015-07-14 15:45:20 UTC
Hello Joe,

I am not encountering any debugging issues when using the cycle 4 bits. Launched fifteen debugging sessions, followed your steps, and the breakpoint was hit every time. After that I changed to the c5sr3 bits and was able to reproduce the described issue where the breakpoint was being missed every other debugging session. Also, waiting >=10 seconds after stopping a debugging session did not affect whether or not the breakpoint was skipped.
Comment 3 PJ 2015-07-22 16:11:34 UTC
Requested info was added -> CONFIRMED
Comment 4 PJ 2015-07-31 12:24:54 UTC
This has not been addressed for C5SR3, and remains an active issue. I poked Brendan to see if he had an updated assessment of the priority from user reports, for now I'll slate for C5SR4.
Comment 5 PJ 2015-08-17 14:27:04 UTC
Has not become a critical issue for Support. 

Missed freeze deadline for C5SR4. Moving to C6, possibly fixed with XMA.
Comment 6 Enzo Heredia 2015-08-25 15:42:50 UTC
can't reproduce in 4.0.0.1008. please verify.
Comment 9 Ben Beckley 2015-09-04 12:51:33 UTC
I am no longer able to reproduce this in 4.0.0.1099 (6633237). Marking as resolved.