On Tue, 05 Jun 2007 09:37:34 -0700, Fred Chateau
<webmas
@hotelmotelnow.com> wrote:
> I need to loop through a method 599 times, then break at the 600th loop
> in
> the debugger.
> Can I do that in code?
You can write code that checks your loop counter and then calls
Debugger.Break(). Or you can simply set a conditional breakpoint in the
debugger, that checks the loop counter and only breaks at a specific line
when the counter matches the condition you specify.
Pete
-----------------------------------------------Reply-----------------------------------------------
You can customize the breakpoint by right clicking on the red dot
-----------------------------------------------Reply-----------------------------------------------
"Fred Chateau" <webmas
@hotelmotelnow.com> wrote in message
news:OyMTP$4pHHA.1244@TK2MSFTNGP04.phx.gbl...
>I need to loop through a method 599 times, then break at the 600th loop in
>the debugger.
> Can I do that in code?
if (i == 600) global::System.Diagnostics.Debugger.Break();