iphone - How to evaluate/watch a variable or method whilst debugging in XCode -



iphone - How to evaluate/watch a variable or method whilst debugging in XCode -

i come delphi , .net background , have started iphone development. came across problem whilst debugging.

i had next code:

if ([displaytext rangeofstring:@"."].location != nsnotfound) .....etc

i wanted evaluate whilst debugging not work out how it. found expressions window , entered below nil happened:

[displaytext rangeofstring:@"."].location

as i'm used delphi & .net (and know xcode different product) easy stick in variables, methods etc watch window , see result cannot see how in xcode. please can tell me how evaluate things whilst debugging??

thanks

in case, @ debugger type:

p (nsrange)[displaytext rangeofstring:@"."]

you can print out value of objects po, things c structures have printed out "p" , have cast homecoming types objc calls right struct type.

also, putting in expressions window should result in value:

(nsrange)[displaytext rangeofstring:@"."]

in both cases see whole nsrange struct, location , length.

iphone objective-c ios xcode

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -