Xcode Debugger: view value of variable

Manni picture Manni · Jan 19, 2011 · Viewed 134.1k times · Source

My code in a UITableViewController:

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

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?

alt text

Answer

Andriy picture Andriy · Jan 19, 2011

Check this How to view contents of NSDictionary variable in Xcode debugger?

I also use

po variableName
print variableName

in Console.

In your case it is possible to execute

print [myData objectAtIndex:indexPath.row]  

or

po [myData objectAtIndex:indexPath.row]