I found out that you can view wasm modules in developer mode in chrome, and I also found a chromium flag here, however I want to use a different browser to dump the wasm file. How do I do that?
As you suggested by mentioning the Chromium flag it is possible to view the text representation of the binary wasm file in chrome, it is also possible in Firefox. Here is an article on the process which explains the need to generate source maps for this to work. Note the mechanism to generate source maps will vary from compiler to compiler.
http://webassemblycode.com/using-browsers-debug-webassembly/
If by "dump wasm" you are asking how to download the text representation from the browser to the filesystem I think the easiest way to do that would be to download the wasm file, as suggested by the poster above and then to convert it from binary to text using a command line tool like binaryen. I am assuming a linux OS here but the steps will be similar for Windows.
Download and compile binaryen.
https://github.com/WebAssembly/binaryen
you can find the wasm-dis utility in:
binaryen/build/bin
Execute
./wasm-dis file.wasm > file.wat 
which will pipe the disassembled .wasm into the file.wat which can be viewed in any text editor or by executing:
cat file.wat
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With