cloudflare / cloudflare/workers-rs
How do I get full callstacks in the runtime log?
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
I didn't find this in your FAQ or docs, so I'm asking here.
I've been trying to get full callstacks from errors/panics in the console runtime log when I invoke wrangler with `wrangler dev --local`. In my wrangler.toml, I tried adding 'upload_source_maps=true' and to change my build command to call worker-build with --dev instead of release:
```[build]
command = "cargo install -q worker-build && worker-build --release"
[env.development]
[env.development.build]
command = "cargo install -q worker-build && worker-build --dev"
```
In my cargo.toml, I added `debug=2` and `panic='unwind'`
In my lib.rs, I have
```#[wasm_bindgen(start)]
pub fn main() {
console_error_panic_hook::set_once();
console_log::init_with_level(log::Level::Debug).expect("error initializing log");
}
```
I manually added a call to panic!() to see what happens, and I still get the minified js Error with nothing under the "Stack" section. Is there something else I can do to get rust callstacks for errors?
Contributor guide
Assessment
This issue has not been assessed yet.