How can I add an #ifdef DEBUG to Xcode?

后端 未结 2 1437
长情又很酷
长情又很酷 2021-02-04 01:46

I have some code in a project which should never be used in the release build, but is useful when testing. I\'d like to do something like this:

#ifdef DEBUG
             


        
2条回答
  •  遇见更好的自我
    2021-02-04 02:02

    I usually add my -DDEBUG=1 to the OTHER_C_FLAGS section in my XCode 4 project's build settings.

    And yes, they can even discriminate between Debug / Release / ADHOC / Store builds.

提交回复
热议问题