wasm-bindgen icon indicating copy to clipboard operation
wasm-bindgen copied to clipboard

Mention wasm-stack-trace as an option for better stack traces

Open juancampa opened this issue 3 months ago • 1 comments

We just published a library that hooks up to prepareStackTrace to enhance JavaScript Error objects with DWARF data (using gimli compiled to wasm). I thought it was worth mentioning in the wasm-bindgen guide for folks looking to improve their debugging experience.

It's pretty easy to use (Add a <script> tag to your HTML). This must run before Module compilation so it can't be done in a rust crate.

To illustrate the difference:

Screenshot 2025-10-17 at 12 43 26

juancampa avatar Oct 17 '25 19:10 juancampa

I recently added a community projects page to the guide in https://github.com/wasm-bindgen/wasm-bindgen/pull/4781.

Perhaps update the PR to include it there instead, as a more suitable location for it.

guybedford avatar Nov 05 '25 20:11 guybedford