Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see Rust source code when debugging WebAssembly in a browser?

I am testing a simple todo app in Rust using the YEW framework. When I get an error, the browser console (Devmode) shows JavaScript or assembler (I tried both Chrome and Firefox). How can I get the Rust code? Do I have to setup source maps somewhere?

like image 741
dilvan Avatar asked Jun 06 '18 13:06

dilvan


1 Answers

To achieve this you’d need WebAssembly to support sourcemaps. This is something that is being considered for future tooling, but I don’t think much progress has been made yet.

There is also an open issue for Rust sourcemap support

like image 96
ColinE Avatar answered Nov 03 '22 01:11

ColinE