mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 08:25:32 +00:00
2
Debugging WASM code
Marc Durdin edited this page 2023-03-10 17:30:52 +11:00
Very quick notes on using Chrome Dev Tools + NodeJS to debug wasm versions of Core and kmcmplib:
- Do a debug build (see #8393 for how debug builds can be setup to support debugging)
- Install C/C++ DevTools Support (DWARF) Chrome extension, per https://developer.chrome.com/blog/wasm-debugging-2020/
Run node --enable-sourcemaps --inspect-brk <cmdline>- In Chrome, open chrome://inspect, then open the node inspector when it is listed.
- In order to set breakpoints in the C++ code, you will need to break on the C++
main()entry point in the js bootloader. The location of this can vary so YMMV, but look formain.
Then, it "should just work".
Refs: