By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,693 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,693 IT Pros & Developers. It's quick & easy.

Programmable breakpoints?

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
If i = 300 Then
Console.WriteLine("xxx")
End If

Set a breakpoint on the Console.WriteLine("xxx") line and voila!
"John Dann" <ne**@prodata.co.uk> wrote in message
news:lg********************************@4ax.com...
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

Nov 21 '05 #2

P: n/a
"John Dann" <ne**@prodata.co.uk> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
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.

"John Dann" <ne**@prodata.co.uk> wrote in message
news:lg********************************@4ax.com...
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


Nov 21 '05 #4

P: n/a
"Michael D. Ober" <obermd.@.alum.mit.edu.nospam> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

P: n/a
Then this the solution to OPs problem of putting a breakpoint in.

Mike.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uf**************@TK2MSFTNGP15.phx.gbl...
"Michael D. Ober" <obermd.@.alum.mit.edu.nospam> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Nov 21 '05 #6

P: n/a
"Michael D. Ober" <obermd.@.alum.mit.edu.nospam> schrieb:
Then this the solution to OPs problem of putting a breakpoint in.


Yes, 'Debug.Assert' would work too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.