Microsoft VS 2005 (VC 8.0) Debugging Help

Started by
5 comments, last by viperman1271 15 years, 10 months ago
Hello All I have quite a conundrum. I have recently been trying to debug my program and it seems that all of the member variables for all of my classes are being displayed as <Bad Ptr>. I have an example below:

+ m_onIdle	<Bad Ptr>	std::basic_string<char,std::char_traits<char>,std::allocator<char> >
I know that the variable has been set properly and has a valid value because it is used later to set a material name and there are no errors then. If I try a function scope string variable I can see it in the watch window or if I mouse over while stepping through the code. Please note that I have eliminated possible problems with the code, and I 99% sure that the problem lies with the IDE. If anyone has any insight I would most appreciate solving this great problem with Visual Studio.
Advertisement
Are you debugging Release code?
If I were trying to debug release code there would be no debugging functions because a debug database would not have been generated. The program is a Debug copy.
That is not true.
Release configuration can have debugging database. Visual Studio (at least 2k5 and 2k8) by default generates debugging database for release configuration if you don't turn them off explicitly.
I know that release version can have a debug database generated, which is not the case with my project. Depending on what type of project you choose, Visual Studio must enable it by default. I always use the empty project settings and it does not generate debugging information, by default, for Release copies.
Quote:Original post by viperman1271
I always use the empty project settings and it does not generate debugging information, by default, for Release copies.
I always use the empty Project settings too, but that didn't stop me from wasting an hour one day trying to figure out why the values in the debugger didn't match what the code was actually doing. (Hint: It was because I was debugging the Release executable.)

If that isn't your problem though, I don't know. Try reinstalling Visual Studio.
I need to find an answer instead of falling back to the "if it doesn't work, reinstall" philosophy. I appreciate the suggestion, but that was my first thought.

This topic is closed to new replies.

Advertisement