How to use #define to turn debug information on/off

Hi,

I want to use #define in my scripts to show debug information;

#define isDebug
...
...

public class Example: Monobehaviour {

void Update() {
#if isDebug
//SHOW DEBUG INFORMATION

#endif
}
}

I have never used them before and the documentation seems vague. If I use it like that, how do I then turn the debug off/on.?
Kind Regards

In the PlayerSetting, you can find a Scripting Define Symbols.

You can add your DEBUG case in there and remove it when you go for a production build.

Other way you have to remove the define manually from the script.