Search code examples
windowstestingwindows-xpcrash-reports

How do prevent "Debug Error!" window from appearing?


I have a series of Google Unit Tests that are launched via a bat file. Some of these tests are broken and a window appears when they run:

Microsoft Visual C++ Debug Library
Debug Error! 
  ... Info about error

This window waits for a user to press Abort, Retry, Ignore. Of course, this halts my test. Currently, I delete the broken tests before I run the batch. I want a way to force this window to abort or ignore - so I don't need to skip the broken tests.

This problem is similar to; however, I cannot write to reg keys How do I disable the 'Debug / Close Application' dialog on Windows Vista?

Update: My manager says this window might not appear if this project was in release. Trying to do that now. However, if there is a solution besides changing my project to release, I would appreciate it! :D


Solution

  • That's what you get from a failed assert() in the source code. Useful to debug the test. But actually running unit tests against code that was compiled in the Debug configuration is not useful. Your customer isn't going to run the Debug build either.

    Only test the Release build, that disables those assert() calls as well.