Debugging code below embind

18 views
Skip to first unread message

キャロウ マーク

unread,
Jan 24, 2020, 10:11:20 PM1/24/20
to emscripten-discuss
How can I debug the c++ code being called via embind?

When I step into the JS function call I see the embind stub but when I try to step into “invoker” the debugger steps over it instead of into the compiled code.

I have a source map but the browser debugger isn’t showing me anything except the .wasm file which is not human understandable and has very long lines so setting a breakpoint doesn’t seem possible. How do I see the source map? It is being loaded. I can see the request being fulfilled by the server. And no source map issues are reported in the console.

I’m using Firefox 72.0.2. Yes, I am compiling with -O0 -g and linking with -g4.

The debugging page of the Emscripten docs doesn’t say anything about *how* to use source maps. Nor does it say anything about debugging embind.

Regards

-Mark
signature.asc

キャロウ マーク

unread,
Jan 25, 2020, 3:30:40 AM1/25/20
to emscripten-discuss
The source map is pointing at sources which are siblings of the directory where I am running the http server, i.e. they begin with “../“. The browser is trying to fetch those files with the leading ..{,/..} stripped off so receives a 404 error. I really do not want to have all my source under the directory where I run the server. Is there some way to get the browser to fetch the sources from where they are?

Regards

-Mark
signature.asc
Reply all
Reply to author
Forward
0 new messages