I would like to check in C++ 2010 if the build is running as Debug or Release. Is there a simple way to check that?
Thank you.
VisualStudio generates _DEBUG
and NDEBUG
as a define
. You can check it at compile time.
#ifdef _DEBUG
// THE CODE IS COMPILING IN DEBUG MODE.
#endif
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