IDE step through bug

R

Randy

Hello,

I have found that when stepping through a piece of code the IDE does not
work correctly. Here is the code snip:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim intTest As Int16

If True Then
If False Then intTest = 2
Else
End If

MessageBox.Show(intTest.ToString())
End Sub


To demonstrate the bug, put a break point on the line that says:

If True Then

Then step through the code. If you see what I see, then it will appear
as though the code steps into the assignment intTest = 2. Thankfuly the
code is actually working correctly, because as you can see the value of
intTest has not been changed. So this is just and IDE step through bug.

I have only tested this in VB.NET.

I am using:
Microsoft Development Environment 2003 Version 7.1.3088
Microsoft .NET Framework 1.1 Version 1.1.4322
Microsoft Visual Basic .NET 69586-335-0000007-18792


I am assuming I am not the only one who has found this bug, but thought
I should report it anyway.

Are there any pathes for this?



Thanks

Randy
 
K

Klaus Löffelmann

Randy,

I remember that being a bug in C#, VS2002 and the FW1.0 without the service
pack. I'm also quite sure, that SP2 corrected that bug (correct me, if I'm
wrong).

But, yes, I'm surprised, you're right!
However, put it in seperated lines, like this, and it'll work fine:

Dim intTest As Int16

If True Then
If False Then
intTest = 2
Else
End If
End If

Klaus
 
H

Herfried K. Wagner [MVP]

* Randy said:
I have found that when stepping through a piece of code the IDE does not
work correctly. Here is the code snip:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim intTest As Int16

If True Then
If False Then intTest = 2
Else
End If

MessageBox.Show(intTest.ToString())
End Sub


To demonstrate the bug, put a break point on the line that says:

If True Then

Then step through the code. If you see what I see, then it will appear
as though the code steps into the assignment intTest = 2. Thankfuly the
code is actually working correctly, because as you can see the value of
intTest has not been changed. So this is just and IDE step through bug.

I have only tested this in VB.NET.

I am using:
Microsoft Development Environment 2003 Version 7.1.3088
Microsoft .NET Framework 1.1 Version 1.1.4322
Microsoft Visual Basic .NET 69586-335-0000007-18792

That's a bug, I am able to repro it on VS.NET 2003 too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top