Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio C++ Debugger: No hex dump?

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.

like image 503
Zombies Avatar asked Feb 06 '09 18:02

Zombies


2 Answers

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.

like image 147
Rob K Avatar answered Sep 22 '22 21:09

Rob K


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.

like image 30
Marc Bernier Avatar answered Sep 23 '22 21:09

Marc Bernier