The debugger in vb.net 1.1 doesn't show correctly the execution pa

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I have a strange experience with coding in vb.net 2003. Steeping through the
following code:

Me.optWarmWaterByAmount.Checked = True
Me.optWarmWaterByPercent.Checked = False

Me.WarmWaterCosts.Text = ""
Me.WarmWaterPercent.Text = ""

If Me.optWarmWaterByAmount.Checked Then Me.WarmWaterCosts.Text =
Me.WarmWaterValue.Text
If Me.optWarmWaterByPercent.Checked Then Me.WarmWaterPercent.Text =
Me.WarmWaterValue.Text

the debugger shows as if the instruction in the second IF statement would be
executed (the yellow shadow covers that instruction as an execution step),
however (luckily) it doesn't really do it.

Making a whole-type IF statements with the closing End If for both of the
conditional statement shows the execution path correctly.

Interesting, isn't it. I've made a google search but found nothing. Is it a
known problem, which occurs sometimes, or just a rare surprise for me? :-)

Best regards,

SlowArrow.
 
Hi

Here is my test code, based on my test, the "s2 = "b2"" will not be high
lighted when we run the code by Press F10.
You may have a try.

Dim b1 As Boolean = True
Dim b2 As Boolean = False
Dim s1 As String
Dim s2 As String
If b1 Then s1 = "b1"
If b2 Then s2 = "b2"
MsgBox("Ok")

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Peter,

Before my question i tested by nearly the same code, and there was no
problem with _that_. Perhaps, the circumstances are different (for the code
and/or the vb.net environment). Perhaps some events & event-codes lard the
situation (i tried to test them carefully, but i don't exclude a problem in
my program). I have no long .net experience (just since the beginning of the
year), but as far as i could remember, i had the same problem once (of
course, in other circumstances, but i didn't deal with it too much, because i
was at the very beginning; unfortunately i don't remember the situation). It
would have been better to ask: are there anybody experiencing something
similar?

Thank you for your advice, i appreciate it very much,

SlowArrow.
 
Hi

Thanks for your quickly reply!
I think it is important to reproduct a problem before resolved it.
If you have any new information, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Peter,

Unfortunately i won't have enough time in the close future. But i will test
and try to reproduce it again in a month, and notify you, whatever the
results will be.

With regards,

SlowArrow.
 
Hi

Thanks for your quickly reply!

I look forward to hearing from you.
In the mean time, I will keep researching to see if I can try to reproduce
it at my side.
Thanks!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top