简体   繁体   English

Visual Studio C ++调试器:没有十六进制转储?

[英]Visual Studio C++ Debugger: No hex dump?

Why is the integrated vs debugger so... barely functional? 为什么集成式vs调试器如此...几乎没有功能? 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. 没有什么比反汇编器强大,只有调试器。

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. VS在找不到源代码时默认为您提供反汇编功能,并且很容易进入内存视图。 Debug-> Windows -> Memory. 调试-> Windows->内存。 Type "this" into the Address: box to get the memory of your current object. 在“地址:”框中键入“ this”以获取当前对象的内存。 To view a specific member type '&this->member_name'. 要查看特定成员,请输入“&this-> member_name”。 It'll jump right to the first byte. 它会跳到第一个字节。

Debug | 调试| Windows | Windows | Memory | 内存| Memory1-4. 记忆1-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. 在VS的旧版本中,如果要查看变量的内容,则需要确定变量的地址,我通常使用监视窗口。

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. 但是,在较新的版本中,通常就像在监视窗口中一样,只需键入变量的名称作为“地址”即可。

VS2005 has a "memory" tab that would give bytes of memory. VS2005有一个“内存”选项卡,它将提供内存字节。 I don't know exactly how to convince it to highlight blocks of hex for you to tell you which variables are which though. 我不知道该如何说服它突出显示十六进制块,以告诉您哪些变量是哪个变量。

Debug | 调试| Windows | Windows | Memory will let you look at any area of memory you want (subject to process/access limitations). 内存可让您查看所需的任何内存区域(受进程/访问限制)。 This is in VS2005. 这是在VS2005中。 Might be slightly different menu structure in other versions. 在其他版本中,菜单结构可能会略有不同。

我不知道它是否有用,但是Google快速搜索“将调试器显示为位图的内存 ”出现了Bitmap Memory Debugger ,该位图旨在与其他调试器(如Visual Studio或WinDbg)一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM