Bug 36078 - Xunit Test Runner hangs when a breakpoint is set in a test.
Summary: Xunit Test Runner hangs when a breakpoint is set in a test.
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: 4.0.4 (C6SR4)
Assignee: Joaquin Jares
Depends on:
Reported: 2015-11-19 21:30 UTC by Jon Goldberger [MSFT]
Modified: 2016-05-10 16:57 UTC (History)
18 users (show)

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

Test Project (20.75 KB, application/zip)
2015-11-19 21:30 UTC, Jon Goldberger [MSFT]

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 Jon Goldberger [MSFT] 2015-11-19 21:30:45 UTC
Created attachment 13908 [details]
Test Project

## Description

In a very simple test project, placing a breakpoint in an XUnit test causes the test runner app to hang. 

## Steps to reproduce

1. Load the attached test project into Visual Studio.

2. Place a breakpoint on the Assert line in BreakpointRepro.Test.cs some_test() method.

3. Launch the BreakpointRepro.Droid app to a simulator or device.

4. Run the test from the app

Expected result: Breakpoint in some_test() method will be hit.

Actual result: Breakpoint is never hit and app hangs with constant spinning activity indicator (or sometimes indicator does not spin but is frozen). 

## Notes

I noted that the Forms version was different in each project, 1.3.3 in the PCL and 1.5.0 in the app project. Changing both to be version 1.5.0 did not affect the issue, nor did updating to Forms 2.0.0 in both projects.

I also confirmed both project are being built in all configurations. 

Customer reports this worked until updating to the C6 base builds currently in the Stable Channel. 

## Version info (mine)

Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Installed Version: Professional

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

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

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

Visual F# 2015 RC   00322-40000-00000-AA850
Microsoft Visual F# 2015 RC

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

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

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

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

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.2.0
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.50616.0
Microsoft SQL Server Data Tools

Visual Studio Tools for Universal Windows Apps   14.0.23309.00 d14oob
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 (f860fe4)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (3efa14c)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS (3c0ec35)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Oren Novotny 2016-02-17 17:47:15 UTC
Any updates on this?
Comment 3 Paul Morris 2016-02-22 14:07:03 UTC
We are also looking for updates on this. Is there a workaround?
Comment 4 Jose Gallardo 2016-02-22 22:08:42 UTC
Assigning the issue for investigation. We'll add more info tomorrow based on results.
Comment 5 Joaquin Jares 2016-02-23 12:54:22 UTC
I have a successful repro. Looking for a fix.
Comment 6 Joaquin Jares 2016-02-25 18:23:35 UTC
I have not found the root cause for the issue and have a working fix. I'm trying to improve it a little, but this should be fixed soon. I'll keep the thread updated.
Comment 9 Dominic N [MSFT] 2016-03-01 18:30:46 UTC
Potential fix for public use: http://xvs.xamarin.com/patcheddrops/Xamarin.VisualStudio_4.0.1.102.msi

Please note that this an untested build that may introduce other issues. If you do install, please let us know if it works or not.
Comment 11 Benjamin Gmeiner 2016-03-07 10:35:50 UTC
For me the installer above fixed the issue... Is this fix included in the beta release?
Comment 12 Joaquin Jares 2016-03-07 13:00:08 UTC
This fix is not included in because it didn't make the testing deadline. If you need with this included please do tell and I'll create a hotfix for it.
Comment 13 Benjamin Gmeiner 2016-03-07 13:03:00 UTC
I would really appreciate a new hotfix based on Thanks for your help.
Comment 14 Oren Novotny 2016-03-07 13:10:14 UTC
We need to get this into the stable release before Evolve at the very least. I have a talk on cross-platform unit testing with xUnit and this part needs to work :)

Comment 15 Joaquin Jares 2016-03-07 13:32:41 UTC
I will make sure to let the correct people now. Evolve shouldn't be a problem (and it will be awesome, as always :)). That said, this issue only manifests if you manually edit the csproj and add AssemblyName on configuration groups, so it shouldn't be a blocker.

The hotfix is being built. I'll update as soon as it's done.
Comment 16 Joaquin Jares 2016-03-07 15:00:15 UTC
Dismiss my last comment, wrong bug :S. Still building for this.
Comment 17 Joaquin Jares 2016-03-07 18:18:38 UTC
This is a version of 145 + the fix for this issue: xvs.xamarin.com/patcheddrops/Xamarin.VisualStudio_4.0.1.146.msi

As always, this version is completely untested and should be used at your own risk. You can always revert to .145 if it doesn't work for you.
Comment 18 Oren Novotny 2016-03-23 01:50:31 UTC
Did this make it into the .147 stable release? I don't see any mention of it on the release notes page: https://releases.xamarin.com/xamarin-studio-and-xamarin-vs-stable-hotfix-for-debugging-of-ios-6-7-devices/
Comment 19 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-23 06:39:04 UTC
The candidate fix is _not_ yet included in the current Stable channel version XamarinVS

In this case the version number of "" from Comment 17 is (a bit confusingly) not comparable to the Stable channel releases because the untested build from Comment 17 was built from a separate source code branch.

## Target milestone Cycle 7

The candidate fix _is_ included in the current Cycle 7 Preview version available on the Alpha channel. I will update the target milestone and resolution status accordingly.
Comment 20 Oren Novotny 2016-03-23 11:52:15 UTC
So if I need to use this in demo's during Xamarin Evolve, what should I do? Will 4.1 be stable by then?
Comment 21 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-24 03:14:00 UTC
I have sent a follow-up to Comment 20 via email. The short summary is that the release calendar for April is under planning and additional information will be made available as soon as possible.
Comment 22 xamarin-release-manager 2016-04-15 18:52:09 UTC
Fixed in version (cycle6)

Author: Jose Gallardo
Commit: e7da20816dc45bc8a9f2b8609bfa0b2c0993ebb2 (xamarin/XamarinVS)