Visual Studio Debugger displays wrong values for native types

后端 未结 3 1422
暖寄归人
暖寄归人 2021-01-21 16:31

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 v

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-21 16:37

    I don't know what's the type of g_pGame, but it is possible to write extensions for Visual Studio so you can view the values of your custom types. Although that feature is mainly targeted for other use, like you have your own String container and you know it's internal details and you want to simply see the string value in it. So normally it is not for working around misbehavior. Also, writing such extension needs effort, and it won't help the problem with other types. But I want to let you know.

提交回复
热议问题