Bug 44366 - Breakpoint in PCL project is not hit anymore
Summary: Breakpoint in PCL project is not hit anymore
Status: RESOLVED DUPLICATE of bug 42359
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: --- critical
Target Milestone: 4.2.1 (C8SR1)
Assignee: Joaquin Jares
Depends on: 44578
  Show dependency tree
Reported: 2016-09-15 14:12 UTC by Michael Rumpler
Modified: 2016-09-29 09:17 UTC (History)
7 users (show)

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

Complete log file (136.00 KB, text/plain)
2016-09-20 14:04 UTC, Michael Rumpler

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 Michael Rumpler 2016-09-15 14:12:06 UTC
# Steps to reproduce
Place a breakpoint in the main PCL project of a Xamarin.Forms solution and deploy to a physical iPad4 with iOS 9.3.3.

# Expected behavior
Execution stops at the breakpoint

# Actual behavior
Breakpoint doesn't work.

# Supplemental info (logs, images, videos)
When I test on a simulated iPad Air iOS 10, then the breakpoint is hit.
When I set a breakpoint in the iOS project, then it is also hit when testing on the real device.

# Test environment (full version information)

Windows 10
Microsoft Visual Studio Professional 2015, Version 14.0.25431.01 Update 3
Xamarin (c4382f5)
Xamarin.iOS (6c3fee4)

OS X El Capitan, 10.11.5
Xcode Version 8.0 (8A218a)
Xamarin Studio Professional Version 6.1 (build 5441)
Xamarin.iOS Version: (Visual Studio Professional)
Hash: 6c3fee4
Branch: xcode8
Build date: 2016-09-09 13:01:32-0400
Comment 1 Ben Beckley 2016-09-15 22:46:35 UTC

I was not able to reproduce this issue using an iPad Pro 9.3.4 and an iPad Air 9.1. If 
possible, could you please attach a sample app for us to use in reproduction attempts?

Thank you.
Comment 2 Ben Beckley 2016-09-15 22:49:55 UTC
*** Bug 44380 has been marked as a duplicate of this bug. ***
Comment 3 Michael Rumpler 2016-09-19 07:19:13 UTC
bblonchek attached a repro project to his bug #44380 which you marked as duplicate of this one. https://bugzilla.xamarin.com/attachment.cgi?id=17557

Do you still need a repro project from me?
Comment 5 Michael Rumpler 2016-09-20 14:03:37 UTC
Strange, now I cannot start any project at all anymore.
I tried to start three different solutions with F5. They all start, I see the launch image, but then they crash immediately.

In the output window I only see:

Launch failed. The app 'GestureSample.iOS' could not be launched on 'Michaels iPad'. Please check the logs for more details.
The app has been terminated.

The log file contains:

Xamarin.Messaging.Client.MessagingClient Error: 0 : [2016-09-20 15:47:45.6810] An error occured on the receiver while executing a post for topic xvs/idb/ and client vs6972Micha
Xamarin.Messaging.Exceptions.MessagingRemoteException: An error occured on client IDB420680 while executing a reply for topic xvs/idb/ ---> System.FormatException: Input string was not in a correct format.


Xamarin.Messaging.Exceptions.MessagingRemoteException: An error occured on client IDB420680 while executing a reply for topic xvs/idb/ ---> Xamarin.Messaging.Exceptions.MonotouchException: 2016-09-20 15:50:02.600 mlaunch[1198:11924] Connection peer refused channel request for "com.apple.instruments.server.services.processcontrol"; channel canceled <DTXChannel: 0x7fd0241a9320>
error MT1007: Failed to launch the application '/Users/Michael/Library/Caches/Xamarin/mtbs/builds/GestureSample.iOS/3005e292840f243bc596f074de6e64ce/bin/iPhone/Debug/GestureSampleiOS.app' on the device 'Michaels iPad': Object reference not set to an instance of an object. You can still launch the application manually by tapping on it.

I can start the app manually when I tap on it, but I cannot debug it anymore. Start Without Debugging (Ctrl-F5) in VS doesn't work either.
Comment 6 Michael Rumpler 2016-09-20 14:04:58 UTC
Created attachment 17613 [details]
Complete log file
Comment 7 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-21 03:43:42 UTC
My expanded testing of the sample project on Bug 44380 suggested that the underlying problem for that issue was Bug 42359.  It's quite possible the original symptoms as described in Comment 0 of this bug were caused by the same problem.

But I suspect the new symptoms from Comment 5 of this bug are mostly a separate problem (though still quite possibly related to device-specific builds).  My hunch about the involvement of device-specific builds in the symptoms from Comment 5 is based on the fact that the reporter of Bug 44380 also filed a non-public report (Bug 44301) about those same error messages, and we know from Bug 44380 that that user has device-specific builds enabled in at least some projects.

For the cleanest tracking of the issue from Comment 5 and Comment 6, it could be advantageous for the reporter to copy-paste that information into a new bug report to ensure a clean investigation of that specific behavior as distinct from the original symptom on this bug.  Alternatively, the original reporter is welcome to mark Comments 0 through 4 as non-public and change the Summary of this bug to describe Comment 5.  Thanks in advance!
Comment 8 Michael Rumpler 2016-09-21 15:23:25 UTC
I created bug 44578 for the symptoms described in Comment 5.

I do have device-specific builds enabled in my main app where the problem occurred first (described in Comment 0). Unfortunately I cannot check if disabling it fixes this bug because I run into the other.
Comment 9 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-21 23:14:11 UTC
Excellent.  Thanks!  I'll mark this bug as a duplicate of Bug 42359 for the moment.  Once Bug 44578 is resolved, please do feel free to reopen this bug if the original symptom from Comment 0 reappears (and can't be resolved by disabling device-specific builds).

*** This bug has been marked as a duplicate of bug 42359 ***
Comment 10 Michael Rumpler 2016-09-22 07:51:06 UTC
But I could debug the PCL project in cycle 7 and bug 42359 is for cycle 7.
Comment 11 Michael Rumpler 2016-09-29 09:17:40 UTC
After I rebooted my iPad the problems from Comment 5 / Bug 44578 are gone.

The breakpoint in the PCL project is now hit when I disable device-specific builds.