views:

1472

answers:

7

Why is the integrated vs debugger so... barely functional? I cannot see the contents of an object in memory. For example, I am working with bitmaps and I would like to see them in memory. Do I need a better debugger for this? If so I am interested in recommendations. Nothing too powerful like a disassembler, just the debugger.

+1  A: 

VS2005 has a "memory" tab that would give bytes of memory. I don't know exactly how to convince it to highlight blocks of hex for you to tell you which variables are which though.

Calyth
+1  A: 

Debug | Windows | Memory will let you look at any area of memory you want (subject to process/access limitations). This is in VS2005. Might be slightly different menu structure in other versions.

Steve Fallows
Using vs 2008 here. Thanks though.
Zombies
+14  A: 

I've never found it to be "barely functional". VS gives you disassembly by default when it can't find source, and it's pretty easy to get to the memory view. Debug-> Windows -> Memory. Type "this" into the Address: box to get the memory of your current object. To view a specific member type '&this->member_name'. It'll jump right to the first byte.

Rob K
And how nice is it when memory just doesn't show up in that menu, just when you really need it and yes I have Enable address level debugging turned on...
ufotds
Is this while running a C++ program from it's project under the debugger? It won't show up in situations where it doesn't make sense.
Rob K
+2  A: 

Use WinDBG when you fall out of Visual Studio abilities.

total
A: 

Debug | Windows | Memory | Memory1-4. Put the address of the block of memory you want to look at in the Address. It's probably the most difficult menu option you'll ever attempt to execute with your mouse (you'll see...).

In older versions of VS, if you wanted to look at the contents of a variable, you needed to determine the address of the variable, I usually used the watch window.

However, in newer versions, you often can just type in the name of the variable as the Address, just like you would in a watch window.

Marc Bernier
A: 

I don't know if it's any good, but a quick Google search for "debugger display memory as bitmap" turned up Bitmap Memory Debugger, which was designed to be used alongside another debugger such as Visual Studio or WinDbg.

bk1e
A: 

Thanks Marc Bernier !!!

MsieurV