Reputation: 5969
I want to use Xcodes capabilities to log certain data. In fact it should be quite simple to achive something similar to
NSLog(@"Size: %@", NSStringFromRect(self.view.frame));
with the Log Message
action of a breakpoint. I tried variations of this:
Size: @NSStringFromRect([[self view] frame])@
but failed.
I already searched the Xcode documentation and was surprised how bad that feature is documented. The only bit of information I was able to find was about how configuring at sound playing action when hitting breakpoints.
Upvotes: 6
Views: 1718
Reputation: 7344
Another solution would be:
Size: @(const char *)[[[[some objects] object] description] UTF8String]@
The output is not as nice as the one in fourplusone answer but it will work with all objects which provide a good description.
Upvotes: 3