Bug 42359 - Unable to hit breakpoints in PCLs when "Device-specific builds" are enabled in an iOS Project
Summary: Unable to hit breakpoints in PCLs when "Device-specific builds" are enabled i...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger (show other bugs)
Version: 4.1.0 (C7)
Hardware: PC Windows
: --- normal
Target Milestone: 4.3.0 (C9)
Assignee: Joaquin Jares
URL:
: 44366 44380 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-07-05 15:50 UTC by Cody Beyer (MSFT)
Modified: 2016-12-05 11:52 UTC (History)
9 users (show)

Tags: BZRC7S1_C6SR4S1
Is this bug a regression?: Yes
Last known good build: Cycle 6 SR 4


Attachments
Sample (25.79 KB, application/x-zip-compressed)
2016-07-05 15:50 UTC, Cody Beyer (MSFT)
Details
Diagnostic MSBuild output (from Cycle 8) (114.60 KB, application/zip)
2016-09-21 03:01 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 Cody Beyer (MSFT) 2016-07-05 15:50:55 UTC
Created attachment 16573 [details]
Sample

# Description

The following basic app contains a referenced PCL which provides the string value for a button title. When using device-specific builds, a breakpoint within the PCL will not be hit. If device-specific builds are disabled, then the breakpoint is hit

# Sample

Attached

# Steps to Reproduce

	1. Download sample
	2. Open in Visual Studio
	3. Target device
	4. Ensure "Enable Device-specific Builds" is check via Properties > iOS Build
	5. Ensure breakpoint is set at line 13 of Class1.cs within DSB_Lib_Test_PCL
	6. Deploy to iOS
	7. Tap button

# Expected Results

Tapping button should cause breakpoint set in step 5 to be hit

# Actual Results

Breakpoint is not hit

# Versions

Microsoft Visual Studio Professional 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01584

Installed Version: Professional

LightSwitch for Visual Studio 2015   00322-40000-00000-AA193
Microsoft LightSwitch for Visual Studio 2015

Visual Basic 2015   00322-40000-00000-AA193
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA193
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA193
Microsoft Visual C++ 2015

Visual F# 2015   00322-40000-00000-AA193
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA193
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   5.209.60613.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11106.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.7
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60311.1
Microsoft SQL Server Data Tools

TypeScript   1.8.31.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25219.00
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.1.1.3 (34a92cd)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.1.1.1 (7db2aac)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   9.8.1.4 (3cf8aae)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-21 00:57:41 UTC
*** Bug 44380 has been marked as a duplicate of this bug. ***
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-21 03:01:37 UTC
Created attachment 17626 [details]
Diagnostic MSBuild output (from Cycle 8)

## Regression status: Regression in Cycle 7 compared to Cycle 6 – Service Release 4



### BAD: Cycle 8

XamarinVS 4.2.0.680 (c4382f5)

Xamarin.iOS 10.0.0.6 (xcode8: 6c3fee4)
Mono 4.6.0 (mono-4.6.0-branch/746756c)
Xcode 8.0, Build version 8A218a


The debugger does _not_ break on the breakpoint.  Instead the button text updates to a new value and the debugger never pauses.

(Changing the linker setting to "Link SDK assemblies only" had no effect.)



### BAD: Cycle 7 SR 1

XamarinVS 4.1.2.18 (fcbe082)

Xamarin.iOS 9.8.2.22 (cycle7-sr1: f37444a)
Mono 4.6.0 (mono-4.6.0-branch/746756c)
Xcode 7.3, Build version 7D175


The debugger does _not_ break on the breakpoint.  Instead the button text updates to a new value and the debugger never pauses.




### BAD: Cycle 7

XamarinVS 4.1.0.530 (2e39740)

Xamarin.iOS 9.8.0.323 (cycle7: 39ebb77)
Mono 4.4.0 (mono-4.4.0-branch-c7-baseline/5995f74)
Xcode 7.3, Build version 7D175


#### Primary symptom

The debugger does _not_ break on the breakpoint.  Instead the button text updates to a new value and the debugger never pauses.

(Changing the linker setting to "Link SDK assemblies only" had no effect.)


#### _Change_ compared to Cycle 6 SR 4

This might or might not be related to the primary symptom.  The selected device-specific architecture for my iPad Mini 2 device changed from armv7 to arm64:

> $ lipo -i bin/iPhone/Debug/build-ipad4.4-8.0/DSB_Lib_Test_iOS_SB.app/DSB_Lib_Test_iOS_SB 
> Non-fat file: bin/iPhone/Debug/build-ipad4.4-8.0/DSB_Lib_Test_iOS_SB.app/DSB_Lib_Test_iOS_SB is architecture: arm64


### GOOD: Cycle 6 SR 4

XamarinVS 4.0.4.4 (a9c7826)

Xamarin.iOS 9.6.2.4 (cycle6-xi: d8bedd0)
Mono 4.2.4 (explicit/71b88f3)
Xcode 7.3, Build version 7D175


#### Initial bad result on my iOS 8.0 test device due to missing framework

> Dyld Error Message:
>   Library not loaded: /System/Library/Frameworks/PushKit.framework/PushKit
>   Referenced from: /private/var/mobile/Containers/Bundle/Application/2FAF0C3E-F127-4CAF-8D5A-66ABE79555EA/DSB_Lib_Test_iOS_SB.app/


#### GOOD result after enabling "Link SDK assemblies only"

The app breaks successfully on the breakpoint.

As a sanity-check the device-specific build feature does appear to still have the intended effect on the build with these versions:

> $ lipo -i bin/iPhone/Debug/build-ipad4.4-8.0/DSB_Lib_Test_iOS_SB.app/DSB_Lib_Test_iOS_SB
> Non-fat file: bin/iPhone/Debug/build-ipad4.4-8.0/DSB_Lib_Test_iOS_SB.app/DSB_Lib_Test_iOS_SB is architecture: armv7






## Additional test environment info (brief)

Microsoft Visual Studio Professional 2015, 14.0.25431.01 Update 3
Windows 10 (Build 10240) 64-bit

OS X 10.11.6

Test device: iPad Mini 2, iOS 8.0
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-21 23:14:11 UTC
*** Bug 44366 has been marked as a duplicate of this bug. ***
Comment 6 Joaquin Jares 2016-11-30 18:21:13 UTC
Fixed in C9. It will be available soon.