Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I tried to analyze the running app with the Firefox dev console, but the GitHub hosted page said there were no sources!

Browsing the Sokol Github, it looks like it's compiling to web assembly. I'm not very familiar with web assembly, how does one normally debug it?



With the sokol libs as platform abstraction it works quite well to develop and debug a native build in a regular C/C++ IDE and then only cross-compile to WASM. Most bugs are platform agnostic and would also happen in the native build. For the rare case that problems only happen in the WASM build, regular printf-debugging usually works well enough, or in case of WebGL specific problems there will be validation errors on the JS console from the browser's WebGL implementation).

(disclaimer: sokol author)


I haven't tried it but Chrome dev tools supports debugging C++ compiled to WASM with DWARF debug symbols.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: