Bug 38240 - [XVS C6SR1] Breakpoints in library projects fail to pause the debugger if the Visual Studio UI is set to a language other than English
Summary: [XVS C6SR1] Breakpoints in library projects fail to pause the debugger if the...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General (show other bugs)
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- critical
Target Milestone: 4.0.1 (C6SR1)
Assignee: Bugzilla
URL:
: 38221 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-01 08:46 UTC by Brendan Zagaeski (Xamarin Support)
Modified: 2016-02-26 22:11 UTC (History)
5 users (show)

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


Attachments
Test case: template Xamarin.Forms app (172.21 KB, application/zip)
2016-02-01 08:46 UTC, Brendan Zagaeski (Xamarin Support)
Details

Description Brendan Zagaeski (Xamarin Support) 2016-02-01 08:46:00 UTC
Created attachment 14823 [details]
Test case: template Xamarin.Forms app

[XVS C6SR1] Breakpoints in PCLs do not pause the debugger if the Visual Studio UI language is not set to English


This is a rather surprising behavior, but all of my testing indicates that breakpoints in PCLs are indeed skipped by the debugger if the UI language in Visual Studio is set to a language other than English.

The problem affects _both_ Android and iOS. (It does not affect Windows Phone.)




## Partial temporary workaround: switch the VS UI language to English



1. Install the English language pack from the VS downloads page:
https://www.visualstudio.com/downloads/download-visual-studio-vs


2. Locate the International Settings section in the Visual Studio options.

(https://msdn.microsoft.com/en-us/library/ms246590.aspx#Anchor_1)

German:  Debuggen -> Optionen -> Umgebung -> Internationale Einstellungen

French:  Outils -> Options -> Environnement -> Paramètres internationaux

English: Tools -> Options -> Environment -> International Settings


3. Set the Language to "English" and then restart Visual Studio.




## Regression status: regression in Cycle 6 – Service Release 1 that affects only VS with non-English UI languages


### Cycle 6 – Service Release 1

> BAD:  XamarinVS 4.0.1.89   (413372c) + Xamarin.iOS 9.4.1.25 (962a050)  + VS UI language German
> BAD:  XamarinVS 4.0.1.89   (413372c) + Xamarin.iOS 9.4.1.24 (47eb74b4) + VS UI language German
> BAD:  XamarinVS 4.0.1.89   (413372c) + Xamarin.iOS 9.4.1.24 (47eb74b4) + VS UI language French
> GOOD: XamarinVS 4.0.1.89   (413372c) + Xamarin.iOS 9.4.1.24 (47eb74b4) + VS UI language English


### Cycle 6 – iOS 9.2 compatibility

> GOOD: XamarinVS 4.0.0.1717 (1390b70) + Xamarin.iOS 9.4.0.0  (7322991)  + VS UI language German
> GOOD: XamarinVS 4.0.0.1717 (1390b70) + Xamarin.iOS 9.4.0.0  (7322991)  + VS UI language French




## Steps to replicate

1. Run Visual Studio with the UI language set to a non-English option. (See the "workaround" section above, but adjust the instructions to switch _away_ from English.)

2. Create a new "Visual C# -> Cross-Platform -> Blank App (Xamarin.Forms Portable)" project. (Or use the attached test case.)

3. Set a breakpoint in the PCL project on the line `MainPage = new ContentPage` in `App.cs`.

4. Debug the app on iOS simulator or Android emulator.




## Results

The app launches and displays "Welcome to Xamarin Forms!" without ever pausing on the breakpoint.




## Additional observations



- The Debug output shows that the breakpoint is successfully resolved even in the "BAD" cases:

> Resolved pending breakpoint at 'App.cs:15,1' to void FormsApp1.App..ctor ()



- The difference in behavior between different UI languages with XamarinVS 4.0.1.89 is apparently _not_ due to a change in the build output files. In particular, if I build and run the app using the German UI language, then change the UI language to English and re-run the app, the breakpoint is hit successfully. If I then run `diff -r` on the build output files from the first run vs. the second run I find _no_ differences. (I tested both the Windows and Mac output files.)




## Additional environment info (brief)


### Windows 10 64-bit (US English)

Visual Studio 2015 Update 1

(I also tested Visual Studio 2013 Update 5, and it failed in precisely the same ways when the UI language was set to German or French.)


### Mac OS X 10.10.5

Xamarin.iOS 9.4.1 was paired with Mono 4.2.2 (996df3c)
Xamarin.iOS 9.4.0 was paired with Mono 4.2.1 (6dd2d0d)

Xcode 7.1, Build version 7B91b
Comment 3 Brendan Zagaeski (Xamarin Support) 2016-02-01 09:08:09 UTC
*** Bug 38221 has been marked as a duplicate of this bug. ***
Comment 4 Brendan Zagaeski (Xamarin Support) 2016-02-01 09:50:38 UTC
After a little additional testing, I found that this problem affects _all_ library projects, not just PCLs. I have updated the "Summary" field accordingly.
Comment 5 xamarin-release-manager 2016-02-01 23:42:08 UTC
Fixed in version 99.0.0.1199 (master)

Author: jmt
Commit: d6cad6e8d902dc1fde80fdd315e0c82cb6906838 (xamarin/XamarinVS)
Comment 6 Arpit Jha 2016-02-02 06:40:16 UTC
****************************************************************************
Reproduce Status: Reproduced 
****************************************************************************

I have checked this issue with XVS 4.0.1.89(413372c) + XI 9.4.1.25(Hash 962a050) and able to rerpoduce this issue with the help of bug description for android and iOS app both.

Screencast: http://www.screencast.com/t/ffvFoJKdA68


******************************************************************************
Verify Status: Verified
******************************************************************************
I have checked the same with XVS 4.0.1.93(c7eb0f) +   XI 9.4.1.25(Hash 962a050) and now breakpoint gets hits with VS Frrench laungage for android and iOS app both.

Screencast: http://www.screencast.com/t/Dg9VB7eiO9

Hence closing this issue.

Note: I ma using VS French Language Pack.

Environment Info:  https://gist.github.com/Arpit360/fe276b5d53d36785f2bc
Comment 7 Brendan Zagaeski (Xamarin Support) 2016-02-03 08:03:54 UTC
## Status update

The candidate fix for this issue has now been published as a hotfix to the Stable updater channel in XamarinVS 4.0.1.93.
Comment 8 xamarin-release-manager 2016-02-26 22:11:40 UTC
Fixed in version 4.0.1.127 (cycle6)

Author: jmt
Commit: 0a24be9b45b0f1e6ea46cf311f2202e5f05141ee (xamarin/XamarinVS)

Note You need to log in before you can comment on or make changes to this bug.