Visual Studio 2015调试:无法检查值. [英] Visual Studio 2015 Debugging: Cannot examine values.

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

问题描述

我刚刚从Visual Studio 2102更新到了Visual Studio 2015年更新1.

我可以编译和调试C ++项目,但是我不再能够在调试和发布模式下检查本地STL容器和变量.

I can compile and debug C++ projects, but I’m no longer able to inspect local STL containers and variables in debug and release mode. Neither by hovering over the variable nor from the Auto, Local or Watch window; 'Children cannot be evaluated' is shown instead.

我已将标记使用受管兼容模式"设置为在工具中|选项|调试器一般.

是否必须更改设置才能看到这些值?我是否需要编写自己的.natvis文件,甚至 STL对象?

Is there a setting I have to change in order to be able to see the values ? Does I need to write my own .natvis file even for STL obejcts?


推荐答案

CrelJo,

Hi CrelJo,

我创建一个示例Win32 Console项目,并添加一行代码来定义变量和设置值.然后,在此代码行上添加一个断点.当我开始调试并且Visual Studio达到断点时,我从右键单击中添加对这一行代码的监视 上下文菜单中,我可以在自动",本地"和监视"所有窗口中监视此变量的值.

I create a sample Win32 Console project and add a line of code to define a variable and set value. Then I add a breakpoint on this line of code. When I start debugging and Visual Studio hit the breakpoint, I Add Watch for this line of code from right-click context menu and I can watch the value for this variable in all of Auto, Local and Watch window.

请创建一个简单的C ++项目,以检查此问题是在所有项目中发生,还是仅在特定项目中发生.

Please create a simple C++ project to check whether this problem occurs with all projects or just this specific project.

如果仅针对该特定项目,您的项目是否很大并且引用了许多其他库?因为如果儿童无法评估"消息经常在未完全加载时出现.您可以尝试创建一个新项目,然后移动该项目 逐一归档以确认是否是真正原因.它还可以帮助我们确定哪个文件导致了此问题.

If just for this specific project, whether your project is large and reference many other libraries? Since if the 'Children cannot be evaluated' message often appeared when it doesn't load completely. You can try create a new project and then move the project files one by one to confirm whether it is the real reason. And it also can help us make sure which file causes this issue.

如果对于所有项目,请尝试执行以下步骤来解决此问题.

If for all project, please try with below steps to troubleshoot this problem.

  1. 以管理员身份运行Visual Studio.
  2. 关闭计算机上安装的Avira Antivirus.大多数防病毒软件都会阻止或验证其他程序的操作.
  3. 使用"devenv/ResetSkipPkgs"运行Visual Studio 2015;
  4. 使用"Deven.exe/SafeMode"在安全模式下运行Visual Studio 2015;该命令可防止在Visual Studio启动时加载所有第三方VSPackage,从而确保稳定的执行.
  5. 使用工具"->重置Visual Studio 2015中的所有设置.选项->导入和导出设置->重置所有设置.

如果上述步骤不起作用,请检查%AppData%\ Microsoft \ VisualStudio \ 14.0路径下的ActiveLog.xml.当您操作Visual Studio时,此文件将记录所有操作.请检查此文件中是否有任何错误日志,可能是 这个问题的原因.

If above steps don't work, please check the ActiveLog.xml under the path of %AppData%\Microsoft\VisualStudio\14.0. This file will log all operations when you operate Visual Studio. Please check whether there has any error log in this file which may be the reason for this problem.

最好的问候,
威威

Best Regards,
Weiwei


这篇关于Visual Studio 2015调试:无法检查值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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