Microsoft Visual Studio C++ Runtime - Disable Debug Assertion from Console

256 views Asked by At

For the MS Visual Studio C++ Runtime is there a way to disable the Windows Assertion Dialog via an environment variable or in some other non-invasive external way? That is, do this without recompiling. This solution or this one point one in the right direction to using _CrtSetReportMode, but it requires rebuilding the program, and I can't do that.

Is there an environment variable or something that I can set to so that child processes just exit with the appropriate error code? I don't want to disable this for all programs, just this one (hence why an environment variable would be appropriate), but if a global setting or something is all I can get then so be it.

Maybe there's a better higher level approach that avoids the problem? I have a testing program that is executing a program on multiple inputs. The child program can assert at times, and I just want to record the result and continue.

0

There are 0 answers