Reputation: 1070
While debugging an iOS application, I know how to print values of objects using :
print "variable name"
po "variable name"
p "integer Variables"
I wanted to know how to print value of a constant while debugging in Xcode? Is there any command that prints value of a constant? Because, if I use the above commands, the Xcode returns an error saying
error: use of undeclared identifier
Thanks.
Upvotes: 3
Views: 3400
Reputation: 2980
Old question, but nowadays compiling with -g3
(GCC) or -fdebug-macro
(Clang) will generate debug information for such preprocessor macros.
Upvotes: 0
Reputation: 5817
Macros (what you get when you #define something) are the domain of the language preprocessor. They are expanded and the expanded value is used when compiling your code.
The debugger doesn't parse your source file, it works off of what's in the binary. So no, you won't be able to view the value of #define macros in the debugger.
Upvotes: 10