14.04.2013 Views

The Path to Better Debugging on iOS

The Path to Better Debugging on iOS

The Path to Better Debugging on iOS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Bey<strong>on</strong>d Rubber Ducking<br />

NSLog(@"Made it here, yay!");<br />

#define ALog(format, ...) NSLog((@"%s [L%d] " format), \<br />

__PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)<br />

#if DEBUG_LOGGING_ENABLED<br />

#define DLog(format, ...) ALog(format, ##__VA_ARGS__)<br />

#else<br />

#define DLog(...)<br />

#endif<br />

(gdb) po anObject<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!