about summary refs log tree commit diff
path: root/library/std/src/sys/mod.rs
diff options
context:
space:
mode:
authorkromych <vdso@hexbites.dev>2024-09-05 15:26:34 -0700
committerkromych <vdso@hexbites.dev>2024-09-05 15:26:34 -0700
commitfc28a2a506f66c739e6c059eb044ed98a3f805c2 (patch)
tree43d03065aa061b8fca58cdeaecfcbcd4111b9f2a /library/std/src/sys/mod.rs
parentd571ae851d93541bef826c3c48c1e9ad99da77d6 (diff)
downloadrust-fc28a2a506f66c739e6c059eb044ed98a3f805c2.tar.gz
rust-fc28a2a506f66c739e6c059eb044ed98a3f805c2.zip
Break into the debugger (if attached) on panics (Windows, macOS, Linux, FreeBSD)
The developer experience for panics is to provide the backtrace and
exit the program. When running under debugger, that might be improved
by breaking into the debugger once the code panics thus enabling
the developer to examine the program state at the exact time when
the code panicked.
Let the developer catch the panic in the debugger if it is attached.
If the debugger is not attached, nothing changes. Providing this feature
inside the standard library facilitates better debugging experience.

Validated under Windows, Linux, macOS 14.6, and FreeBSD 13.3..14.1.
Diffstat (limited to 'library/std/src/sys/mod.rs')
-rw-r--r--library/std/src/sys/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/mod.rs b/library/std/src/sys/mod.rs
index 1ef17dd530f..96d6f2c87c4 100644
--- a/library/std/src/sys/mod.rs
+++ b/library/std/src/sys/mod.rs
@@ -11,6 +11,7 @@ mod personality;
 pub mod anonymous_pipe;
 pub mod backtrace;
 pub mod cmath;
+pub mod dbg;
 pub mod exit_guard;
 pub mod os_str;
 pub mod path;