Odd breakpoint behaviour ?

  • Thread starter Thread starter One Handed Man [ OHM# ]
  • Start date Start date
O

One Handed Man [ OHM# ]

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
 
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 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
 
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
 
Nono...

Solar Flare Electronic Disruption.

"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> wrote in message 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 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
 
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

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
 
Back
Top