Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
844 views
in Technique[技术] by (71.8m points)

c++ - Visual Studio Debugger displays wrong values for native types

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:

Visual Studio displaying wrong values for native types

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...