简体   繁体   English

VC++ 查看某个地址内存的快捷方式

[英]VC++ Shortcut to look at memory at an address

In Visual Studio 2015, I can look at the memory in my program by bringing out the memory window (alt+6) during debugging, copying a pointer's address, and pasting it into the window.在 Visual Studio 2015 中,我可以通过在调试期间调出内存窗口(alt+6)、复制指针地址并将其粘贴到窗口中来查看程序中的内存。 This shows me the surrounding memory, which is my favourite feature of the debugger.这向我展示了周围的内存,这是我最喜欢的调试器功能。

This is a lot of steps though for such a frequent task, and has to be done for each address.对于如此频繁的任务,这是很多步骤,并且必须为每个地址完成。

Is there an easier way of seeing the memory a pointer is pointing at, along with surrounding memory?有没有更简单的方法来查看指针指向的内存以及周围的内存? Maybe a shortcut I'm missing, or a setting that causes the hover dialog to display more than just one "object" a pointer addresses?也许是我缺少的快捷方式,或者导致悬停对话框显示的不仅仅是一个指针地址的“对象”的设置?

Usually when developing C++ project in debug mode.通常在调试模式下开发 C++ 项目时。

Apart from Memory window, we also have auto window,local window and watch window.The layout for me looks like below:除了内存窗口,我们还有自动窗口、本地窗口和监视窗口。我的布局如下所示:

在此处输入图片说明

Drag the variable to memory window and you can get the memory the variable refers to, also with its surrounding memory.And for pointer, it also works to automatically enter the address into memory window.变量与周边memory.And为指针拖动到内存窗口,你可以得到的变量是指内存,另外,它也可以自动输入地址到内存窗口。

If it works or not, please give me a feedback.如果有效或无效,请给我反馈。

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

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