I often find myself add a bunch of #ifdefs for code that I only want executed during the development but not in the shipped products. In order to make the code a bit easier to read I decided to make a small method that takes a C block (available in iOS 4.0 and Mac OS X 10.6) instead.
You would use it like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
You can download debug.[ch] from GitHub and simply add them to your project. You also need to edit your project settings for the Debug configuration to set the DEBUG macro.
