What do the exception messages say? Also are you seeing any suspicious messages about missing functions in the build process? E.g. if any GL functions are not implemented by the Emscripten WebGL wrapper it would most likely already show up as warnings during the linker stage.
Another (more likely) reason is that the code which worked fine on "desktop GL" has problems with WebGL's much stricter specification and validation, in that case the error messages in the JS console usually provide a hint about what's going wrong.
The only advice I can give regarding debugging is to compile with -g so that Emscripten doesn't do any minification or name mangling, that way the callstack in the exception messages is readable (functions have their expected names instead of being minified). IME usually that's enough to figure out what's going wrong.
Cheers,
-Floh.