-
I recently switched from (stdweb + cargo web start) to (web_sys + wasm-pack).
-
In (stdweb + cargo web start), on panics, I could get file names + line numbers.
-
In (websys + wasm-pack), all I am getting are function names; similar to:
https://github.com/rustwasm/console_error_panic_hook/blob/master/with_panic_hook.png -
I am a big fan of line numbers and would like them back.
-
I am building my code via
wasm-pack build --target web --dev
-
In cargo.toml, I have:
[profile.dev]
debug=true
[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"
debug=true
- The entry point to my code is:
pub fn set_panic_hook() {
console_error_panic_hook::set_once();
}
#[wasm_bindgen]
pub fn main() {
set_panic_hook();
x_client_dom::main();
}
Question: is there anything else I can do to get more debug info / get line numbers ? Function name is nice, but line numbers would be ideal.