0

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.