如何从VS 2015测试资源管理器中更改用于调试各个单元测试的调试器设置 [英] How to change debugger settings for debugging individual unit tests from VS 2015 Test Explorer

查看:503
本文介绍了如何从VS 2015测试资源管理器中更改用于调试各个单元测试的调试器设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

测试资源管理器允许在调试器下运行测试,我经常用于调试单个测试。但是在这种情况下使用的调试器设置与测试项目的设置不同,并且可以防止高效调试。我只想将调试限制为仅限于UWP类库的托管模式,而调试器始终以混合本机/受管模式启动。这样可以防止任何调试,因为.NET Core不支持混合模式调试。我在VS 2015上工作。

Test Explorer allows to run tests under debugger and I use it quite often for debugging single tests. However debugger settings used in this case are different from that set for the test project and prevent efficient debugging. I would like to limit debugging to managed mode only for UWP class library while debugger starts always in mixed native/managed mode. This prevents any debugging as .NET Core does not support mixed mode debugging. I work on VS 2015.

检查和测试所有可能的设置后,我无法将调试模式从混合切换到仅管理。任何想法?

After checking and testing all possible settings I have failed to switch debugging mode from mixed to managed only. Any ideas?

未解决:在短时间内清理和重建MEF缓存解决问题。

Not solved: cleanup and rebuild of MEF cache resolved problem for a short time.

调试失败,错误msg 无法附加到CoreCLR。不支持Interop调试

Debugging fails with error msg Unable to attach to CoreCLR. Interop debugging is not supported

推荐答案

上述问题很可能是一个错误 调试器/ coreclr不匹配在Windows运行时。使用UWP运行时版本5.1.0调试在托管,本地和混合模式工作完美。通过将UWP运行时版本更新为5.2.2,可以再现报告的问题。通过降级到UWP运行时5.1.0问题得到解决。我的VS版本是2015 Update 3.1。

The above problem is most probably a bug or debugger/coreclr mismatch in Windows runtime. With UWP runtime version 5.1.0 debugging in managed, native and mixed mode works perfectly. By updating UWP runtime version to 5.2.2 one can reproduce reported problem. By downgrading to UWP runtime 5.1.0 problem is resolved. Version of my VS is 2015 Update 3.1.

所有上述问题都是在干净的Windows 10 Pro和VS 2015 Update 3.1安装中复制。

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

查看评论2 for UWP runtime v5.2.2的解决方法

这篇关于如何从VS 2015测试资源管理器中更改用于调试各个单元测试的调试器设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆