Best way to handle staging vs production


#1

Hi,

I wanted to present different interfaces of a plugin based on whether or not the plugin is a Debug or Release. An example would be to have a debug menu item that allows you to change the server the plugin talks to (localhost vs staging vs production).

I saw that checking JUCE_DEBUG is an option there, however if I didn’t want to include that code at all in the release build, what is the recommended way to go about this?


#2

Surely if you put the code inside an #ifdef block, no traces of it will be in the resulting binary? But I’ve been surprised before…


#3

Precompiler macros like #if JUCE_DEBUG are executed before the source code is compiled, so @Xenakios is correct.