refactor EMCC_DEBUG=2 code to reuse the normal mode code