Not sure I understood the question here (stepping into a function that isn't emitted?). But in general, building with -g (instead of -g0) might help debugging.
On Thu, Sep 19, 2019 at 3:55 AM שחר לנגבהיים <niho...@gmail.com> wrote: > Hi, > I'm trying to debug an issue I have, where emscripten_webgl_create_context > fails to find a second canvas. > The issue happens even when I checked that the canvas can be found using > document.querySelector in the calling JS. > In order to debug this, I'd like to step into the library_html5.js code > and see what's happening there, but AFAIS, library_html5.js isn't > explicitly packaged into the resulting JS code. Is there a way to step into > the code using a debugger? > > Alternatively, can anyone explain why this might happen? It happens only > when I build using -Os or -Oz, not -O3. This is the compilation call: > > em++ -std=c++17 -o ./bin/appWASM.js \ ./src/*/*.cpp > ./build-wasm/srcDerivedFiles/*.cpp ./build-wasm/*.a \ -g0 -Oz \ -s > LEGACY_GL_EMULATION=0 \ -s ALLOW_MEMORY_GROWTH=1 \ -s USE_WEBGL2=0 \ -s > WASM=1 \ -s NO_EXIT_RUNTIME=1 \ -s EXPORTED_FUNCTIONS='["_main"]' \ -s > ERROR_ON_UNDEFINED_SYMBOLS=1 \ -s USE_LIBPNG=1 \ -s USE_FREETYPE=1 \ -s > DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 \ -s ASSERTIONS=1 \ -s > OFFSCREENCANVAS_SUPPORT=0 \ -s USE_PTHREADS=0 \ --bind > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to emscripten-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/003e6e31-cb64-48b8-a8a6-9b43695ea863%40googlegroups.com > <https://groups.google.com/d/msgid/emscripten-discuss/003e6e31-cb64-48b8-a8a6-9b43695ea863%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpTJTwbUEd-b2faigCGAaGhudRsL5%2BS6MnL8uNB7%3DijqUw%40mail.gmail.com.