From 717e791db2c49c46a913c574946e9f410a6d9168 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 10 Oct 2017 20:34:12 -0400 Subject: [PATCH] better abort() implementation for windows in debug mode, it spawns the debugger --- std/os/index.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/std/os/index.zig b/std/os/index.zig index be96f7f776..e31abaf629 100644 --- a/std/os/index.zig +++ b/std/os/index.zig @@ -109,7 +109,10 @@ pub coldcc fn abort() -> noreturn { while (true) {} }, Os.windows => { - windows.ExitProcess(1); + if (builtin.mode == builtin.Mode.Debug) { + @breakpoint(); + } + windows.ExitProcess(3); }, else => @compileError("Unsupported OS"), }