What is the preprocessor on Xcode equivalent for #if DEBUG?


#1

I am adding text to my plugin to know if I am using a debug build or not.

#if DEBUG
	String debugtext = " DEBUG ";
#else
	String debugtext = "";
#endif

Doesn’t seem to work on Mac/XCode. Either that or I haven’t figured out how to actually build a non-debug version. It always gives me the text " DEBUG". I set the Run scheme to release. I do Command + Shift + B to then build.


#2

the best is to use #if JUCE_DEBUG

I do Command + Shift + B to then build.

I beleive you want to do “cmd+B”. Cmd+shift+B is “analyse” (cf the ‘Product’ menu and the schemes editor)


#3

THAT’S WHAT I NEEDED, JUCE_DEBUG

thanks!


#4

Strange, I use DEBUG and it works fine for me.


#5

It won’t work fine on all platforms. Much safer to use JUCE_DEBUG.


#6

good to know. didn’t realise that.