Currently a panic looks like this:
> ./out/debug/deno tests/http_bench.ts
PANIC file 'libcore/option.rs' line 989
Abort trap: 6
This because we've had to override the default panic handler because Tokio (sadly / mistakenly) swallows panics.
It would be very nice to not have to open LLDB to get a backtrace. I expect this issue can be done in one or two lines of code.
std::rt seems have unstable API for getting backtraces. There is a crate backtrace that serves as a wrapper for this which aims to be more stable.
@ry I see is just two lines of code but what's the complexity of this task? you haven't assigned a label.
I would love to work on it.
@Kachulio1 go for it - please see the comments in #1076 first.
Aside simplification is to eprint panic_info.to_string():
std::panic::set_hook(Box::new(|panic_info| {
eprintln!("{}", panic_info.to_string());
std::process::abort();
}));
Most helpful comment
Aside simplification is to eprint
panic_info.to_string():