I am using emscripten to build a wasm project. I want to print some debug information, but do not want it print in release mode. So I write like this:
#ifdef __DEBUG
#define DBGprint(...) printf(__VA_ARGS__)
#else
#define DBGprint(...)
#endif
But I did not find a macro __DEBUG in emscripten which is defined in debug mode but not in release mode. Is there any?
I have found in Emscripten help website:https://emscripten.org/docs/compiling/Building-Projects.html#detecting-emscripten-in-preprocessor
but did not find.
Kevin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.