3 ms·
Yes, there are a bunch of legitimate use cases for large scale development where you want inline tools to assist QA and diagnostic issues. The Visual Studio co
by SteveJS 9y ago
Yes, there are a bunch of legitimate use cases for large scale development where you want inline tools to assist QA and diagnostic issues.
The Visual Studio codebase had (may have changed now) a dialog for debug asserts allowing you to suppress a single instance, suppress repeat instances of just that assert, or suppress all asserts, as well as a bunch of other features. I believe later versions of that macro made use of IsDebuggerPresent to change behavior when the process was being debugged or not.
(I believe previous versions made use of a -different- hack to implement IsDebuggerPresent.)