Xcode Debugger:查看变量的值 [英] Xcode Debugger: view value of variable

查看:194
本文介绍了Xcode Debugger:查看变量的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码在UITableViewController中:

My code in a UITableViewController:

delegate.myData = [myData objectAtIndex:indexPath.row];

如何查看 delegate.myData indexPath.row delegate.myData 应该是一个数组, indexPath.row 一个 int 。我只能看到对象委托 indexPath 的内存地址,但在哪里 myData

How can I see the values of delegate.myData or indexPath.row in the Debugger? delegate.myData should be an array and indexPath.row an int. I can only see memory addresses of the objects delegate and indexPath but where are myData and row?

推荐答案

检查这个如何查看Xcode调试器中NSDictionary变量的内容?

我也使用

po variableName
print variableName

在控制台。

在您的情况下,可以执行

In your case it is possible to execute

print [myData objectAtIndex:indexPath.row]  

po [myData objectAtIndex:indexPath.row]

这篇关于Xcode Debugger:查看变量的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆