dtc
dtc

Reputation: 1849

Xcode: evaluate expression not doing anything

I'm using Xcode 5.0.2 and just set a breakpoint so I can test evaluating some expressions. The problem is, after I add an expression like this one:

[spawnPoint[@"x"] integerValue]

The result of that expression will say "Enter expression" as if I didn't put anything in there. Why? I've tested that some methods work and others won't. This expression definitely does not error out when it's run in the code. It results in some integer value. Pretty confused...

EDIT: from what I can tell so far, xcode does not allow me to use any class (static/instance) methods at all.

Upvotes: 1

Views: 505

Answers (1)

Kevin
Kevin

Reputation: 17566

You need to use p, or print to get the

p [spawnPoint[@"x"] integerValue]

If the object you wanted to log was an object, you would do

po spawnPoint[@"x"]

Edit

I was able to get a response from the compile with either of these two

p [(NSString*)spawnPoint[@"x"] integerValue]
p [(NSString*)[spawnPoint objectForKey:@"x"] integerValue]

Upvotes: 2

Related Questions