用于 XCode 调试的观察窗口
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1729001/
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
Watch window for XCode debugging
提问by Brij
Is there any watch window to see variable value in XCode during debugging? Can we check value just typing variable name as in watch window?
在调试期间是否有任何监视窗口可以查看 XCode 中的变量值?我们可以像在监视窗口中那样只输入变量名来检查值吗?
On mouse over, I can't see value for dictionary type objects.
I see "Variables View" option but it has only first option enabled.
in "Debugger" window, I can't type variable name.
Watchpoint stops your program when the value of an expression changes. But I have to see value during breakpoint.
鼠标悬停时,我看不到字典类型对象的值。我看到“变量视图”选项,但它只启用了第一个选项。
在“调试器”窗口中,我无法输入变量名。
当表达式的值发生变化时,观察点会停止您的程序。但我必须在断点期间看到价值。
Let me know what is the best way to debug.
让我知道什么是最好的调试方法。
Thanks
谢谢
采纳答案by zaph
Use the Expression window. Run:Show:Expressions... Just type in the entry field the variable name or expression . You can also right click/hold on a variable name and in the drop-down menu select "Add to Expression Window".
使用表达式窗口。Run:Show:Expressions... 只需在输入字段中输入变量名称或表达式。您还可以右键单击/按住变量名称,然后在下拉菜单中选择“添加到表达式窗口”。
回答by Mihai Damian
Alternatively, you can click the two little arrows in the mouseover description and select print. You can then see what the dictionary contains in the console.
或者,您可以单击鼠标悬停说明中的两个小箭头并选择打印。然后,您可以在控制台中查看字典中包含的内容。