diff --git a/src/python/pants/engine/native.py b/src/python/pants/engine/native.py index e62074d8db9..1b5bb4e2896 100644 --- a/src/python/pants/engine/native.py +++ b/src/python/pants/engine/native.py @@ -729,4 +729,7 @@ def tc(constraint): return self.gc(scheduler, self.lib.scheduler_destroy) def set_panic_handler(self): - self.lib.set_panic_handler() + if os.getenv("RUST_BACKTRACE", "0") != "1": + # The panic handler hides a lot of rust tracing which may be useful. + # Don't activate it when the user explicitly asks for rust backtraces. + self.lib.set_panic_handler()