Skip to content

Commit 7cb0434

Browse files
committed
msvc: avoid debug assertion windows in Debug Mode
For regular debugging, it is pretty helpful when a debug assertion in a running application triggers a window that offers to start the debugger. However, when running the test suite, it is not so helpful, in particular when the debug assertions are then suppressed anyway because we disable the invalid parameter checking (via invalidcontinue.obj, see the comment in config.mak.uname about that object for more information). So let's simply disable that window in Debug Mode (it is already disabled in Release Mode). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c9a6f68 commit 7cb0434

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compat/mingw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,6 +2437,10 @@ int wmain(int argc, const wchar_t **wargv)
24372437
trace2_initialize_clock();
24382438

24392439
#ifdef _MSC_VER
2440+
#ifdef _DEBUG
2441+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
2442+
#endif
2443+
24402444
#ifdef USE_MSVC_CRTDBG
24412445
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
24422446
#endif

0 commit comments

Comments
 (0)