سؤال

Is there a way to tell the Visual Studio debugger, "break at this line the Nth time it gets executed, not before" (where N is an integer greater than 1)?
(Just for information, I'm using the C# programming language.)

هل كانت مفيدة؟

المحلول

See this MSDN article - How to: Specify a Hit Count.

In short - in the breakpoints window you right click the breakpoint and select Hit Count.

نصائح أخرى

You also may try setting up a counter variable and then use a conditional break point and call:

System.Diagnostics.Debugger.Break();

under a condition.

Yes, if you add a conditional breakpoint and use the breakpoint hit count option.

http://msdn.microsoft.com/en-us/library/aa290719(v=vs.71).aspx

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top