From f2d1a283bc99e396e650161884a567d3c4a3fba0 Mon Sep 17 00:00:00 2001 From: Steven Siloti Date: Fri, 4 Aug 2017 16:30:22 -0700 Subject: [PATCH] Call DebugBreak on assertion failure --- src/assert.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/assert.cpp b/src/assert.cpp index 1f8f98ee8..b0c5b9c9c 100644 --- a/src/assert.cpp +++ b/src/assert.cpp @@ -352,9 +352,14 @@ TORRENT_EXPORT void assert_fail(char const* expr, int line // if production asserts are defined, don't abort, just print the error #ifndef TORRENT_PRODUCTION_ASSERTS +#ifdef TORRENT_WINDOWS + // SIGINT doesn't trigger a break with msvc + DebugBreak(); +#else // send SIGINT to the current process // to break into the debugger raise(SIGINT); +#endif abort(); #endif }