I had the same problem. Using Trace.Assert
works as expected.
So, Trace.Assert
began to exhibit the same behavior in the next debugging session.
Ah, I found a problem.
Consequently, Assert will not be thrown if the “Include only my code” checkbox is not selected, and “Abandoned” is checked for “Exclude the total runtime of the language”.
source share