Quantcast
Viewing all articles
Browse latest Browse all 40524

Emscripten - how to see JS console exceptions?

Emscripten people helped me out here. It seems that the flag needs to be set at the final step of compilation, when the .html file is generated. The PROJECT_CFLAGS are only using the flag when .cpp files are compiled.

I couldn't figure out how to automate this using config.make, but I was able to get it working by repeating the .html compilation step after emmake make finishes, and adding on the flag I want.

It looks like this:

/Users/admin/bin/emsdk_portable/emscripten/1.35.0/em++ -o bin/myproject.html -O3 -s OUTLINING_LIMIT=100000 -s TOTAL_MEMORY=134217728  -s DISABLE_EXCEPTION_CATCHING=0  --memory-init-file 1  obj/emscripten/Release/src/animation.o obj/emscripten/Release/src/main.o obj/emscripten/Release/src/ofApp.o ../../../addons/obj/emscripten/Release/ofxEmscripten/src/ofxAppEmscriptenWindow.o ../../../addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenSoundPlayer.o ../../../addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenSoundStream.o ../../../addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenURLFileLoader.o ../../../addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenVideoGrabber.o ../../../addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenVideoPlayer.o ../../../addons/obj/emscripten/Release/ofxJSON/src/ofxJSONElement.o ../../../addons/obj/emscripten/Release/ofxJSON/libs/jsoncpp/src/jsoncpp.o ../../../addons/obj/emscripten/Release/ofxLayerMask/src/ofxLayerMask.o ../../../addons/obj/emscripten/Release/ofxTexturePlane/src/ofxTexturePlane.o ../../../addons/obj/emscripten/Release/ofxAnimatable/src/ofxAnimatable.o ../../../addons/obj/emscripten/Release/ofxAnimatable/src/ofxAnimatableFloat.o ../../../addons/obj/emscripten/Release/ofxAnimatable/src/ofxAnimatableOfColor.o ../../../addons/obj/emscripten/Release/ofxAnimatable/src/ofxAnimatableOfPoint.o ../../../libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.bc   -Wl,--as-needed -Wl,--gc-sections --preload-file bin/data@data --emrun --js-library ../../../addons/ofxEmscripten/libs/html5video/lib/emscripten/library_html5video.js --js-library ../../../addons/ofxEmscripten/libs/html5audio/lib/emscripten/library_html5audio.js --shell-file ../../../libs/openFrameworksCompiled/project/emscripten/template.html ../../../libs/FreeImage/lib/emscripten/libfreeimage.a ../../../libs/boost/lib/emscripten/libboost_filesystem.a ../../../libs/boost/lib/emscripten/libboost_system.a ../../../libs/tess2/lib/emscripten/libtess2.a    ../../../libs/freetype/lib/emscripten/libfreetype.bc

Thanks


Viewing all articles
Browse latest Browse all 40524

Trending Articles