views:

166

answers:

2

Hello!

I'd like to see the content of NSObjects like properties ( arrays, Integers, floats... ). Since I'm a Flex developer I'm used to use the eclipse debugging tool. But now I'm starting with the iPhone I'm kind of lost.

For example, I just downloaded the SeismicXML application from the dev's sample code, and I put a breakpoint on the connectionDidFinishLoading and parseEarthquakeData methods.

I'd like to print the data ( the xml ) but I don't know how.

THe only thing I could achieve is to print the object using the po command on the gdb.

Any idea?

A: 

Unfortunately the visual property viewer doesn't seem to be as nice as I'd like. I spend a good chunk of my time in the gdb console issuing all kinds of crazy print statements.

Bryan McLemore
A: 

How can I debug objects on XCode

On the top left of XCode you can see a drop down menu, make sure to choose "Debug" as the Active config. Put your breakpoints then open Debuuger (from Run menu) You should see something like this alt text

As you can see there is step buttons just like Eclipse.

I'd like to print the data ( the xml ) but I don't know how.

Do you mean printing it to Console? like while tracing? In that case, you can use NSLog(NSString *string);

medopal