0

I'm using a debug macro as defined in this post: How to print out the method name and line number and conditionally disable NSLog?

But now when I upgraded from XCode 4.0.2 to 4.2 all of a sudden there is no debugging output in the console. What happened?

In my App-Prefix.pch:

#ifdef DEBUG_MODE
#   define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#   define DLog(...)
#endif

How I've been using it:

DLog(@"%@", variable);

And then I had a Preprocessor Macro for my Debug target that said DEBUG_MODE=1

Community
  • 1
  • 1
Peter Warbo
  • 11,136
  • 14
  • 98
  • 193

1 Answers1

0

It just sounds as if your Preprocessor macro has been lost during the upgrade. Ensure that, in your build settings for your debug target, that DEBUG_MODE=1 is set.

James Webster
  • 31,873
  • 11
  • 70
  • 114