Skip to content

How do I get full callstacks in the runtime log? #791

@zelbrimo

Description

@zelbrimo

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:

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

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions