Skip to content

Commit e07b8a2

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 dfcb983 commit e07b8a2

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
@@ -2610,6 +2610,10 @@ int wmain(int argc, const wchar_t **wargv)
26102610
trace2_initialize_clock();
26112611

26122612
#ifdef _MSC_VER
2613+
#ifdef _DEBUG
2614+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
2615+
#endif
2616+
26132617
#ifdef USE_MSVC_CRTDBG
26142618
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
26152619
#endif

0 commit comments

Comments
 (0)