Visual C++ Debugging problem

馋奶兔 提交于 2020-01-07 02:22:18

问题


I have been having constant struggle with Visual Studio debugger and finally got fed up and seeking help. There are some issues constantly causing trouble. If you have any solutions I will be grateful

  1. Trying to watch a function that has const and non-const versions results in ambiguous symbol error (CXX0039)
  2. Trying to get value of a function in a template class randomly gives member function is not defined error (CXX0052)
  3. Casting a template type variable results in bad type cast, even to its own type (CXX0019)

I have visual studio 2010 Professional with SP1

EDIT
In #2, I am sure that inlining is off.

Thanks in advance,
Cem


回答1:


I've just experienced the same problem...

Found the answer after some searching on MSDN.

Visual Studio 2005 C++ CXX0052: member function not present!

Basically what you need to do is to store the result in a temp variable, and view this temp variable in the Watch or Locals window. Far from an ideal solution I guess, but it works ( on VS2010 SP1 ).




回答2:


I have found out that the best option is to modify autoexp.dat and show transformed variables. At start its a bit hard but when you are done its even better than getting these problems fixed.



来源:https://stackoverflow.com/questions/7136535/visual-c-debugging-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!