console.h

Functions

void emscripten_console_log(const char *utf8String)

Prints a string using console.log().

Parameters
  • utf8String – A string encoded as UTF-8.

void emscripten_console_warn(const char *utf8String)

Prints a string using console.warn().

Parameters
  • utf8String – A string encoded as UTF-8.

void emscripten_console_error(const char *utf8String)

Prints a string using console.error().

Parameters
  • utf8String – A string encoded as UTF-8.

void emscripten_out(const char *utf8String)

Prints a string using the out() JS function, which by default will write to the console (or stdout), but can be overridden by via the print attribute on the Module object.

Parameters
  • utf8String – A string encoded as UTF-8.

void emscripten_err(const char *utf8String)

Prints a string using the err() JS function, which by default will write to the console (or stderr), but can be overridden by via the printErr attribute on the Module object.

Parameters
  • utf8String – A string encoded as UTF-8.

void emscripten_dbg(const char *utf8String)

Prints the string using the dbg() JS function, which by will write to the console (or stdout). Just like the dbg() JS function this symbol is only available in debug builds (i.e. when linking with -sASSERTIONS or equivelently -O0).

Parameters
  • utf8String – A string encoded as UTF-8.