Debugging a loop

  • Thread starter Thread starter A Mad Doberman
  • Start date Start date
A

A Mad Doberman

All,

I assume this question is pretty basic to someone in the know....I
have problems with a FOR loop, but the problem doesn't occur until the
end on the FOR loop (last few runs). I'm trying to debug it, but there
has to be an easier way! The loop runs through 500 times.

Is there any way to automatically skip to any one point in the loop to
debug starting at that point?

My loop is something like:

For i = 1 to 500
code
Next i

Can I somehow begin debugging at i = 495, for example?

Thanks all!
 
For i = 1 to 500
If i = 495 Then Stop
code
Next i

--
Jim
| All,
|
| I assume this question is pretty basic to someone in the know....I
| have problems with a FOR loop, but the problem doesn't occur until the
| end on the FOR loop (last few runs). I'm trying to debug it, but there
| has to be an easier way! The loop runs through 500 times.
|
| Is there any way to automatically skip to any one point in the loop to
| debug starting at that point?
|
| My loop is something like:
|
| For i = 1 to 500
| code
| Next i
|
| Can I somehow begin debugging at i = 495, for example?
|
| Thanks all!
 
you can also set a watch:

click debug then add watch
enter i = 495 in the expression box and select the option to break when value is
true

then you can use F8 to step through your code.
 
Back
Top