在Visual Studio 2015调试期间缺少本地人 [英] Locals missing during debugging in Visual Studio 2015

查看:289
本文介绍了在Visual Studio 2015调试期间缺少本地人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

调试时,本地人仅显示变量,其他局部变量在本地人观看,但可以在Visual Studio中中间窗口中重新评估





简要

我正在调试Xunit测试我正在写的一些代码。我测试的库是ASP.NET Core RC1的目标。这是我的 project.json




{
作者:[Matthew Abbott],
命令:{
test:xunit.runner.dnx
},
description:为Fx.Content.Composer包提供测试
依赖:{
xunit:2.1.0-rc1-build3168,
xunit.runner.dnx :$ 2.1.0-rc1-build204,
Fx.Content.Composer:
},
框架:{
dnx451:{} ,
dnxcore50:{
dependencies:{
System.Runtime:4.0.21-beta-23516
}
}

$ bprojectUrl:,
tags:[],
version:1.0。 0- *
}



调试单元测试时(我在构建测试中使用Visual Studio功能),我可以设置断点,但是Locals / Watch窗口不允许我检查局部变量声明。我也没有为这些局部变量获取变量的工具提示。



如果我将我的语句复制并粘贴到Intermediate中,然后将它们添加到scope中,但是我无法调试



我尝试过的东西




  • 确保我在调试模式下进行编译

  • 禁用JIT优化

  • 重置我的Visual Studio设置



注意事项




  • 我最近安装了Visual Studio 2015 Update 2

  • 我已经重新启动了IDE几次,没有成功

  • 没有成功重新启动我的机器服务器时间

  • 未明确绑定到单元测试调试会话 - 当我F5运行时,它们也失败



任何帮助将不胜感激!



更新
根据Victor的评论,我尝试了一下进入单元测试的方法,最初一个参数在范围内可用,但是进一步定义的变量不是。



解决方案

这看起来像Visual Studio 2015 Update 2中引入的错误。本质上调试器无法检查动态模块中的局部变量。我们今天发布了一个修补程序。您可以下载补丁此处。修补程序的文档是此处。如果补丁没有解决您的特定情况,请通知我。



谢谢!



-Patrick Nelson


Issue
Locals only displays this variable while debugging, other local variables are not available in Locals or Watch but can be re-evaluated in Intermediate Window in Visual Studio

Brief
I'm debugging an Xunit test for some code I am writing. The library I am testing targets ASP.NET Core RC1. Here is my project.json:

{ "authors": [ "Matthew Abbott" ], "commands": { "test": "xunit.runner.dnx" }, "description": "Provides tests for the Fx.Content.Composer package", "dependencies": { "xunit": "2.1.0-rc1-build3168", "xunit.runner.dnx": "2.1.0-rc1-build204", "Fx.Content.Composer": "" }, "frameworks": { "dnx451": { }, "dnxcore50": { "dependencies": { "System.Runtime": "4.0.21-beta-23516" } } }, "licenseUrl": "", "projectUrl": "", "tags": [ "" ], "version": "1.0.0-*" }

When debugging the unit test (I'm using Visual Studio's in built test features), I can set breakpoints, but the Locals/Watch windows don't allow me to inspect local variable declarations. I also do not get variable tooltips for those local variables.

If I copy and paste my statements into Intermediate, they are then added to scope, but I can't debug easily straight off the bat.

Things I've tried

  • Ensured I am compiling in Debug mode
  • Disabling JIT optimizations
  • Reset my Visual Studio settings

Things of note

  • I've recently installed Visual Studio 2015 Update 2
  • I've restarted the IDE several times without success
  • I've restarted my machine serveral times without success
  • Not explicitly bound to a unit test debugging session - when I F5 to run, they fail there also

Any help would be greatly appreciated!

Update Based on Victor's comment, I tried stepping through into a method from that unit test, and initially a parameter is available in scope, but a variable defined further down is not.

解决方案

This looks like a bug that was introduced in Visual Studio 2015 Update 2. Essentially the debugger is unable to inspect local variables in dynamic modules. We released a hotfix for it today. You can download the patch here. Documentation for the patch is here. Let me know if the patch does not fix your particular scenario.

Thanks!

-Patrick Nelson

这篇关于在Visual Studio 2015调试期间缺少本地人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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