如何在 Xcode 4 中打开内存浏览器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8052402/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 22:21:51  来源:igfitidea点击:

How do I open the memory browser in Xcode 4?

iosxcodeuser-interfacexcode4ide

提问by Tafkadasoh

When debugging programs in Xcode 3, I often used the Memory Browser in a seperate window to view the contents of a buffer change while I step through the lines of code.

在 Xcode 3 中调试程序时,我经常在单独的窗口中使用内存浏览器来查看缓冲区更改的内容,同时我逐步执行代码行。

As I now started using Xcode 4, I wonder how to open a Memory Browser. I can't find anything like that in the UI. Can anybody provide help?

当我现在开始使用 Xcode 4 时,我想知道如何打开内存浏览器。我在用户界面中找不到类似的东西。有人可以提供帮助吗?

回答by Robin Summerhill

Select Product > Debug > View Memory while debugging or press Shift-Cmd-M. This will display the memory browser and add an entry for 'Memory' into the Debug navigator:

选择“产品”>“调试”>“调试时查看内存”或按 Shift-Cmd-M。这将显示内存浏览器并将“内存”条目添加到调试导航器中:

enter image description here

在此处输入图片说明

You can also right-click on a variable in the Debug panel and select View Memory of "*<variable name>" to jump straight to displaying memory for that variable.

您还可以右键单击“调试”面板中的变量并选择“查看内存”“*<变量名称>”以直接跳转到显示该变量的内存。

enter image description here

在此处输入图片说明

回答by Mats Stijlaart

I open it when i debug. I place a breakpoint, right click on an variable -> View In Memory "..." .

我调试的时候打开它。我放置了一个断点,右键单击一个变量 -> 在内存中查看 "..." 。

It will open in a tab, but you can drag the tab out of the Xcode tab-bar.

它将在选项卡中打开,但您可以将该选项卡拖出 Xcode 选项卡栏。