itenyh
itenyh

Reputation: 1939

Where is the DEBUG macro defined?

When I run code such as the following:

- (void)viewDidLoad
{

#ifdef DEBUG
    NSLog(@"debug");
#else
    NSLog(@"here");
#endif
    [super viewDidLoad];
}

I see "debug" printed in the log, but I did not define DEBUG explicitly. Where is it defined?

Upvotes: 10

Views: 4190

Answers (1)

Ben Trengrove
Ben Trengrove

Reputation: 8729

It is most likely defined in your Build Settings under Preprocessor Macros.

Here is an example from one of my projects Here is an example from one of my projects

Upvotes: 18

Related Questions