I would like to know if anyone has any idea of how to switch code between debug mode and release mode? For example, in C#, there is #debug to differentiate the debugging code. The code within #debug only executes in debug mode.
Thanks for any help in advance.
According to this (revision March 2012) :
Build
Added a feature that allows you to run some code only in debug mode. Builds now generate a class calledBuildConfig
containing aDEBUG
constant that is automatically set according to your build type.
You can check the (BuildConfig.DEBUG
) constant in your code to run debug-only functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With