Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 465
Beta Carotin Avatar asked Apr 15 '26 06:04

Beta Carotin


1 Answers

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.

like image 62
Beta Carotin Avatar answered Apr 16 '26 18:04

Beta Carotin