Skip to content

Commit 99ac3a6

Browse files
dschoGit for Windows Build Agent
authored andcommitted
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 82dbc1f commit 99ac3a6

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

24402440
#ifdef _MSC_VER
2441+
#ifdef _DEBUG
2442+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
2443+
#endif
2444+
24412445
#ifdef USE_MSVC_CRTDBG
24422446
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
24432447
#endif

0 commit comments

Comments
 (0)