Google recently  presented the progress made by the Chrome DevTools teams to improve the developer experience of debugging WebAssembly files. A  new extension (in beta) allows developers to debug C and C++ apps compiled to WebAssembly by stepping through the original source code. The new extension complements and improves on the existing capability of stepping through disassembled WebAssembly code directly in the browser.

Ingvar Stepanyan, WebAssembly advocate at Google, presented the  basic debugging experience of C code compiled to WebAssembly that is offered by the Google Chrome developer tool. The C code is compiled with optimizations enabled and without debugging options. The Chrome developer tool pretty-prints the disassembled WebAssembly code and strives to enhance code readability  by using available information from the compiled code to generate relevant function names. The tool additionally features a  linear memory inspector that allows developers to the WebAssembly memory in hexadecimal and ASCII views and navigate to specific addresses.

The previously mentioned developer tools’ abilities may however be insufficient on large scripts (that often include third-party libraries) as the amount of guesswork to reconcile the disassembled WebAssembly code with the original source code dramatically increases.

#webassembly #chrome #debugging #news

New Chrome Extension to Debug Compiled Wasm Code Stepping through C++ Source Files
1.15 GEEK