I want to put a conditional breakpoint that will work if the program ate too much memory. I tried to write this in the condition:
GC.GetTotalMemory(false) > 4000000000 But it turned out that the program just stops working - visually similar to some kind of deadlock. Although, one of the four launches got this:
How to make such a breakpoint? Or even simply, how to make VS stop (but not complete) execution when a certain amount of consumed memory is reached?
Just in case, I note that breakpoint is inside the lock-section.
