The Windows CRT in debug mode will show a Microsoft Visual C++ Runtime Library dialog with Abort, Retry, Ignore options if the application hits an CRT error or assert(false) and sometimes it is created many times and fills the screen.
This dialog can contain lines like "Debug Assertion Failed" or "Debug Error!".
I would love it if the assert would break directly into the debugger skipping the dialog.
I have modified the CRT reporting flags which have had no effect.
I have also tried to modify the reporting hook. It does get called by after 25-30 "Abort" dialogs appear.
I am building a DLL that is loaded by a separate program if that helps. It also looks like the host program loading my DLL is not consistent with what thread is calling my code.
It seems like the one of the threads was stopped but the others are still running.
How do I configure the CRT to do this ?
This works (for me atleast, on vs 2008):
(Essentially, return TRUE from the hooked function)
You could also write your own assert-like behavior (Note that this will show the “Break, Continue” dialog):
Hope that helps!