iphone - Xcode 调试器 : view value of variable

标签 iphone objective-c xcode debugging ios

我在 UITableViewController 中的代码:

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

如何在调试器中查看 delegate.myDataindexPath.row 的值? delegate.myData 应该是一个数组,而 indexPath.row 应该是一个 int。我只能看到对象 delegateindexPath 的内存地址,但是 myDatarow 在哪里?

alt text

最佳答案

查看 How to view contents of NSDictionary variable in Xcode debugger?

我也用过

po variableName
print variableName

在控制台中。

在你的情况下可以执行

print [myData objectAtIndex:indexPath.row]  

po [myData objectAtIndex:indexPath.row]

关于iphone - Xcode 调试器 : view value of variable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4735156/

相关文章:

ios - 如何让 XCode 4.2 识别自定义属性列表结构定义?

ios - 有没有比 'scheduledTimerWithTimeInterval' 更好的方法来制作游戏循环

iphone - UITableView 怪异!带图片

objective-c - 如何自动验证所有方法都在 xcode 中声明

ios - iPad 总是横向启动

iphone - 如何在初始化后定义 UITableViewCell 样式?

iphone - 查看响应的http header

iphone - iOS - 强制键盘以横向显示

iphone - 无法解析 SA_OAuthTwitterEngine/MGTwitterEngine 发送的 JSON

xcode - CoreData 在一个单独的线程中