Getting debug output without the code bloat in release

Following on from my last post¬†we now have a “Debug” build scheme so we should put it to good use. One of the things I do when I want to visually see whats going on in my apps and I don’t want to have to mess with the debugger all the time, I add some NSLogs, but I don’t want these to be in the Release/Distribution versions of the app. So I add this to one of my .h files that gets included everywhere (I normally pick *_Prefix.h):

This will log to the console messages in the console while in -Debug, but if you change to -Testflight or -AppStore the debugging output will go away.


Comments are closed.