High-level overview
Debugging Emscripten's Module is relatively straightforward. Emscripten's error messages are well formed and descriptive, so you'll usually discover what's causing the issue right away. You can view these messages in your browser's development tools console.
If you specified a .html output when running the emcc command, some debugging code will already be built in (Module.print and Module.printErr). Within the HTML file, the loading code sets the window.onerror event to call the Module.printErr event, so you can see details about the error that occurred when loading.
One common error you may encounter is calling the wrong function name. If you're using Emscripten's Promise-like API, you can print out the available functions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access