Programmable breakpoints?

  • Thread starter Thread starter John Dann
  • Start date Start date
J

John Dann

I guess there's no such thing as programmable breakpoints? I'm trying
to debug a program that has a problem deep inside a long loop, eg at
iteration 2000 of around 4000, which makes it realistically impossible
to step through manually. I'd like to be able to say:

If i = 300 then Break

and then start single stepping to find out variable values and the
fault in the logic. But it doesn't seem to exist. Is there any
alternative? (I can't start the loop at a later value for test
purposes because the data flow isn't known at design time.)

JGD
 
If i = 300 Then
Console.WriteLine("xxx")
End If

Set a breakpoint on the Console.WriteLine("xxx") line and voila!
 
John Dann said:
I guess there's no such thing as programmable breakpoints? I'm trying
to debug a program that has a problem deep inside a long loop, eg at
iteration 2000 of around 4000, which makes it realistically impossible
to step through manually. I'd like to be able to say:

If i = 300 then Break

\\\
If i = 300 Then Stop
///

Alternatively you can set a breakpoint on a line, right-click it, choose
"Breakpoint properties..." from its context menu and add a condition.
 
Do you have:

Debug.Assert

in the VB 7.x IDE? If not, just another reason I'm staying with VB 6 until
VB 8 is released.

Mike Ober.
 
Michael D. Ober said:
Do you have:

Debug.Assert

in the VB 7.x IDE? If not, just another reason I'm staying with VB 6
until
VB 8 is released.

'Debug.Assert' is supported in VS.NET 2002 and 2003.
 
Back
Top