DEBUG define symbol ?

Need help. The documentation does not say this.
Do we need to use DEBUG define? Or is it out of date and will be deleted in the future?

I have two important questions:

  1. When does DEBUG go to build and when does not?
  2. How do I enable/disable DEBUG in build?

I have DEBUG always working in editor

I don’t think Unity asserts this. Perhaps C# does. I don’t use it.

Here’s more info:

https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

There’s also a ton of stuff the cloud build injects for you but that doesn’t matter unless you’re using cloud build.

Yes, I read https://docs.unity3d.com/Manual/PlatformDependentCompilation.html but I am interested specifically in DEBUG.

I want to separate piece of code that will ONLY be for debug build. Do I need to add my define type TEST to Player Settings - Define Symbols?

For example, github, I want to put out a library there, it will have code that should ONLY work in debug builds (not in releases)

This is generally how it is done, yes. You would just need to tweak those settings before making either a DEBUG or non-DEBUG build accordingly. You can write editor scripts for easy reconfiguration.