[英]How to print integer values while debugging in Xcode?
While debugging an iOS application, I know how to print values of objects using : 在调试iOS应用程序时,我知道如何使用以下命令打印对象的值:
print "variable name" 打印 “变量名”
po "variable name" po “变量名”
I wanted to know how to print values of variables which are not object-type, like for example NSInteger, int, float etc. 我想知道如何打印非对象类型的变量的值,例如NSInteger,int,float等。
Thanks. 谢谢。
just use p intVar
to print variables. 只需使用
p intVar
打印变量。
Sometimes you need to cast: p (CGRect)[[self view] frame]
有时您需要
p (CGRect)[[self view] frame]
: p (CGRect)[[self view] frame]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.