Bug 36087 - Unable to debug XUnit Tests on VS 2013/15
Summary: Unable to debug XUnit Tests on VS 2013/15
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 4.0.0 (C6)
Hardware: PC Mac OS
: Normal normal
Target Milestone: Future Cycle
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-11-20 06:21 UTC by Prashant Cholachagudda
Modified: 2017-08-07 07:11 UTC (History)
9 users (show)

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


Attachments
Zip Xamarin Logs (286.22 KB, application/zip)
2016-01-22 18:58 UTC, Atin
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:
RESOLVED FIXED

Description Prashant Cholachagudda 2015-11-20 06:21:55 UTC
I have currently run into an issue with Visual Studio 2013/15 and the XUnit
test runner project that is causing debugging to stop working. 

I was previously able to hit breakpoints in XUnit tests, and now the breakpoints
I put in stop execution, but Visual Studio 2013 no longer picks up the
debug session and the xunit runner application just suspends itself.\

Testcase/Screenshots/Version information and video - https://www.dropbox.com/sh/au84myj9dgmj8hw/AAC5Sd31ruAHtnbYyoSdE9yua?dl=0
Comment 1 Atin 2016-01-22 18:58:17 UTC
I have checked this issue and able to reproduce the reported behavior with the help of sample given in the bug description.

Screencast of XVS: http://www.screencast.com/t/v8DwlFMV3
Screencast of Simulator: http://www.screencast.com/t/wTtNEilqGDA
Debug Output: https://gist.github.com/saurabh360/34c9da89f943248e61f3
Simulator Logs: https://gist.github.com/saurabh360/f2c4a96bcf0af33f8ad1

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0447006-02725
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0447006-02725
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0447006-02725
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0447006-02725
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0447006-02725
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0447006-02725
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0447006-02725
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

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

ASP.NET and Web Tools   12.5.60612.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Web Apps
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

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

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

CodeInjector   1.0
Injects code into the currently debugging WPF app.

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

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

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

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

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

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   4.0.1.84 (60a4d68)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.1.9 (8dd1a77)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.4.1.24 (47eb74b)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Atin 2016-01-22 18:58:45 UTC
Created attachment 14679 [details]
Zip Xamarin Logs
Comment 3 Ken Sykora 2016-02-17 18:32:33 UTC
For those that land here, I've been able to workaround this issue (haven't tried to reliably reproduce) if I put a breakpoint that gets hit in the main thread before any breakpoints that hit within threaded or async/await code.

Try putting a breakpoint in the assembly that gets hit in the main thread before your async/await breakpoints would execute.
Comment 4 Ken Sykora 2016-02-17 18:33:16 UTC
Also, related github issue: https://github.com/xunit/devices.xunit/issues/29
Comment 5 Prashant [MSFT] 2017-08-07 07:11:07 UTC
This is fixed in Device.XUnit repo see - https://github.com/xunit/devices.xunit/issues/29#issuecomment-190837363