Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#if DEBUG Always True for DEBUG and RELEASE modes

For some reason, Any code like:

#if DEBUG
    CallSomeMethod();
#endif

Is always true regardless of debug or release mode. Any ideas why, and what setting I can use to turn the feature on or off? For the project, define DEBUG constant is set to true.

Thanks.

like image 589
Brian Mains Avatar asked Aug 03 '11 16:08

Brian Mains


1 Answers

You should be able to select the release mode in your project properties. Right click your project, select Properties and click the build tab on the left of the window. From there, you can uncheck the "define DEBUG constant" box. Make sure you do this for the release build, and not the debug mode.

enter image description here

like image 189
Chad La Guardia Avatar answered Sep 30 '22 18:09

Chad La Guardia