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

Odd breakpoint behaviour ?

P: n/a
Pressing Button2 does cause the breakpoint shown in Button1's handler to be active the first time. After stopping the program and restarting it it break as soon as you start Button1,

Any ideas what I might be doing wrong ?

--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
-------------------- CODE BELOW ------------------

'At Class Level
Private breakpoint As Boolean = False

'//Start the loop
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer
Dim c As Integer
Dim b As Integer = 1
For a = 0 To 1000000
c = 0 '<< My Breakpoint properties are when me.breakpoint as changed
Application.DoEvents()
Debug.WriteLine(breakpoint)
Next
End Sub
'//Stop the loop
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

breakpoint = Not breakpoint
End Sub


Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
All of a sudden it started working properly, must be those space alliens beaming down their bug ray on my computer !

--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com

"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Pressing Button2 does cause the breakpoint shown in Button1's handler to be active the first time. After stopping the program and restarting it it break as soon as you start Button1,

Any ideas what I might be doing wrong ?

--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
-------------------- CODE BELOW ------------------

'At Class Level
Private breakpoint As Boolean = False

'//Start the loop
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer
Dim c As Integer
Dim b As Integer = 1
For a = 0 To 1000000
c = 0 '<< My Breakpoint properties are when me.breakpoint as changed
Application.DoEvents()
Debug.WriteLine(breakpoint)
Next
End Sub
'//Stop the loop
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

breakpoint = Not breakpoint
End Sub


Nov 20 '05 #2

P: n/a
Nono...

Solar Flare Electronic Disruption.

"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> wrote in message news:OO**************@TK2MSFTNGP10.phx.gbl...
All of a sudden it started working properly, must be those space alliens beaming down their bug ray on my computer !

--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com

"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Pressing Button2 does cause the breakpoint shown in Button1's handler to be active the first time. After stopping the program and restarting it it break as soon as you start Button1,

Any ideas what I might be doing wrong ?

--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
-------------------- CODE BELOW ------------------

'At Class Level
Private breakpoint As Boolean = False

'//Start the loop
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer
Dim c As Integer
Dim b As Integer = 1
For a = 0 To 1000000
c = 0 '<< My Breakpoint properties are when me.breakpoint as changed
Application.DoEvents()
Debug.WriteLine(breakpoint)
Next
End Sub
'//Stop the loop
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

breakpoint = Not breakpoint
End Sub


Nov 20 '05 #3

P: n/a
Cor
OHM,

Or I do not understand you or I do not have the behaviour you said,

I copied your code to a form. pushed the button2 stopped the debugger and started it again and than button1.

What should happen than?

Cor

Nov 20 '05 #4

P: n/a
I dont know why it did that, but it simply stopped doing it and works ok now, thanks 4 testing it 4 me.

Cheers - Terry

--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com

"Cor" <no*@non.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
OHM,

Or I do not understand you or I do not have the behaviour you said,

I copied your code to a form. pushed the button2 stopped the debugger and started it again and than button1.

What should happen than?

Cor

Nov 20 '05 #5

P: n/a
* "One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> scripsit:
Any ideas what I might be doing wrong ?


You are posting in HTML format. That's wrong.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.