Call DebugBreak on assertion failure

This commit is contained in:
Steven Siloti 2017-08-04 16:30:22 -07:00 committed by Arvid Norberg
parent 1e05a91f99
commit f2d1a283bc
1 changed files with 5 additions and 0 deletions

View File

@ -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
}