Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9214515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:59:12+00:00 2026-06-18T01:59:12+00:00

I am trying to set DEBUG_MODE macro for DLOG to work only debug mode

  • 0

I am trying to set DEBUG_MODE macro for DLOG to work only debug mode but it is not working…

What I tried so far: http://developer.sinnerschrader-mobile.com/llvm-preprocessor-macros-xcode/275/

and naming one more flag as DEBUG_MODE, playing combinations with or without $(inherited) value.

I am all confused, what is green highlighted part stands for? and why is some parts seen empty but when clicked values are seen in it?

How should I configure my macros so that I can really access them for:

#ifdef DEBUG
#   define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#   define DLog(...) do { } while (0)
#endif

enter image description here

EDIT:

This is become really wicked! I have set all values to DEBUG=0 in release mode. And changed

#if DEBUG
#   define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#   define DLog(...) do { } while (0)
#endif

still seeing all logs in release…

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:59:13+00:00Added an answer on June 18, 2026 at 1:59 am

    Your Preprocessor macro settings (Debug being DEBUG=1 and Release being DEBUG=0) will cause the first definition of the DLog() macro to be used given you have used #ifdef (if defined) to provide different implementations. This is because the macro will be defined if you define it at all, regardless of what you define it to.

    What you need to do is, either:

    • Remove DEBUG=0 from your Release profile.
    • Use #if DEBUG instead of #ifdef DEBUG.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to set up argparse on my python program but it's not working.
Trying to set a flag in the post to allow processing or not. The
When trying to set DoMatchParen I get the following error: E492: Not an editor
I am trying to run remote jboss in debug mode to debug my application
I'm trying to debug a program that I do not have the source for
I'm trying to implement the logging approach at http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ . I'm not sure how
I'm trying to debug a large ASP.NET application. I set a breakpoint on the
Does anybody know how to debug call to undefined function init_set , when trying
Im trying set the single table inheritance model type in a form. So i
Trying to set up a self signed certificate, for our intranet's web services site.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.