diff --git a/Cargo.toml b/Cargo.toml index 1db94b79705b6..40a424679f6d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,7 +87,7 @@ incremental = false [profile.release] opt-level = 3 lto = "fat" -strip = true +strip = "debuginfo" panic = "abort" codegen-units = 1 diff --git a/crates/cli/src/handler.rs b/crates/cli/src/handler.rs index 61d3246f4738b..6666686c5555d 100644 --- a/crates/cli/src/handler.rs +++ b/crates/cli/src/handler.rs @@ -48,6 +48,11 @@ impl EyreHandler for Handler { /// /// Panics are always caught by the more debug-centric handler. pub fn install() { + // If the user has not explicitly overridden "RUST_BACKTRACE", then produce full backtraces. + if std::env::var_os("RUST_BACKTRACE").is_none() { + std::env::set_var("RUST_BACKTRACE", "full"); + } + let debug_enabled = std::env::var("FOUNDRY_DEBUG").is_ok(); if debug_enabled { if let Err(e) = color_eyre::install() {