Visual Studio Debugger对本机类型显示错误的值 [英] Visual Studio Debugger displays wrong values for native types
问题描述
我使用Visual Studio 2008(版本9.0.30729.1 SP)和.NET 3.5编写托管C ++和本机C ++中的程序。
调试时,Visual Studio显示错误的值类型,如size_t和本地指针。
使用消息框,我可以验证实际值是否正确。
是否有办法修复此行为?
I am writing a program in managed C++ and native C++ using Visual Studio 2008 (Version 9.0.30729.1 SP) and .NET 3.5.
When debugging, Visual Studio displays obviously wrong values for types like size_t and pointers that are native.
Using messageboxes, I can verify that the actual values are correct though.
Is there a way to fix this behaviour?
此处是一个屏幕截图来澄清我的意思:
Here is a screenshot to clarify what I mean:
推荐答案
似乎切换 Common Language Runtime Support
配置属性
从纯MSIL公共语言运行时支持(/ clr:pure)
到公共语言运行时支持(
做了伎俩。我现在可以查看原生对象只是很好。
/ clr)
It seems that switching the Common Language Runtime Support
under Configuration Properties
from Pure MSIL Common Language Runtime Support (/clr:pure)
to Common Language Runtime Support (
/clr)
did the trick. I can now view native objects just fine.
这篇关于Visual Studio Debugger对本机类型显示错误的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!