Visual Studio Debugger显示本机类型的错误值 [英] Visual Studio Debugger displays wrong values for native types
问题描述
调试时,Visual Studio显示类似size_t的类型显示错误的值和本机的指针。
使用消息框,我可以验证实际值是否正确。
有没有办法解决这个问题?
这里是一个屏幕截图来澄清我的意思:
似乎切换通用语言运行时支持
配置属性
从纯MSIL公共语言运行时支持(/ clr:pure)
至通用语言运行时支持(
做了一个诀窍。我现在可以查看本地对象了。
/ clr)
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:
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屋!