How to change debugger settings for debugging individual unit tests from VS 2015 Test Explorer

Test Explorer allows you to run tests under the debugger, and I often use it to debug individual tests. However, the debugger settings used in this case differ from those set for the test project and prevent effective debugging. I would like to restrict debugging in managed mode to the UWP class library only, while the debugger always starts in mixed native / managed mode. This prevents any debugging, since .NET Core does not support mixed mode debugging. I am working on VS 2015.

After checking and testing all the possible parameters, I was not able to switch the debug mode only from mixed to managed. Any ideas?

Failed: to clear and rebuild the problem with the MEF cache for a short time.

Debugging fails. msg Failed to connect to CoreCLR. Interop debugging not supported

+3
source share
3 answers

The above problem is most likely a bug or debugger / mismatch during Windows runtime. With UWP runtime version 5.1.0, debugging in managed, native, and mixed mode works fine. Upgrading the UWP environment to 5.2.2 can reproduce the reported problem. Downgrading to UWP runtime 5.1.0 the problem is resolved. My VS version is an update to 2015.

All of the above problems were reproduced on clean installations of Windows 10 Pro and VS 2015 Update 3.1.

See comment 2 for workarounds for UWP runtime v5.2.2

+4
source

To extend Jacek Blaszczynski's answer, I had to add the Microsoft.NETCore.Runtime.CoreCLR package version 1.0.4 nuget so that it works with Microsoft.NETCore.UniversalWindowsPlatform version 5.2.2. Interestingly, I was not able to use the current version 1.1.0. It will not even be installed.

As an alternative to MS Test, I suggest using xUnit. It also works with UWP, does not require the addition of the Microsoft.NETCore.Runtime.CoreCLR nuget package, and works much faster. Here is a quick tutorial.

+2
source

Interop debugging is not supported, which means you cannot debug both managed and native types of code at the same time. For CoreCLR applications, use the process application and enable CoreClr, debug it again.

enter image description here

0
source

All Articles