Visual Studio Development Bookmark and Share   
 index > Visual Studio Debugger > VS2005 debugger showing incorrect value for bool
 

VS2005 debugger showing incorrect value for bool

A class member of type bool is shown as false in the tooltip, although its actual value is 01. The compiled code executes correctly. This is a bug in Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600). Using Microsoft Visual C++ 2005 77626-009-0389393-41585

class
CMain : public CWnd
{
...
bool r;
...
};

in void CMain::OnLButtonDown, there is the code
if(r)
{
...
}

which, in the disassembly window, is

cmp byte ptr [esi+122Fh],0 in the release version, and

mov eax,dword ptr [ebp-14h]
movzx ecx,byte ptr [eax+122Fh]
test ecx,ecxin the debug version

followed by je in either case.

Checking the memory location shows the contents are 01, but the tooltip on the boolean variable r shows the value 'false'.




VoiceOfExperience  Friday, May 01, 2009 7:33 AM
Hello,

Thanks very much for your feedback of our product, we are very appreciate for your work!
For a bug report entry, please refer to the connect site of Microsoft:
https://connect.microsoft.com/site/sitehome.aspx?SiteID=210&wa=wsignin1.0

Thanks a lot!
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback, please tell us.
Welcome to the All-In-One Code Framework!
Roahn Luo  Monday, May 04, 2009 8:47 AM
This is the only "bug report" you're going to get from me. Ignore it at your peril. I have other things to do besides your job.
VoiceOfExperience  Friday, July 17, 2009 6:15 AM
I've got the same issue. Do you know if this has been fixed or not?
jdstuart  Thursday, October 15, 2009 4:02 PM

You can use google to search for other answers

Custom Search

More Threads

• Refresh watchlist with tracepoint possible?
• Can't Find .pdb files for the referenced .dll files
• Debugging a lib file!
• Breakpoints disabled due to "post-mortem debugging"
• VS 2005 threading
• How can I debug (step into) a COM dll from a managed forms app written in c# ?
• Probelms with _CRTDBG_MAP_ALLOC for tracing leaks
• VS2003 Invisibly steps through dissassembly
• Remote Debugging (not domain managed)
• OS Symbols saved to wrong locations?