Bug in Single Stepping over WHILE(TRUE) in VS2003

  • Thread starter Thread starter Saint Stephen
  • Start date Start date
S

Saint Stephen

Has anybody seen this? VS skips the first statement in a block while
single-stepping if the loop is WHILE(TRUE). (The code is executed, the
debugger just doesn't stop.)

Repro: Create a new Smart Device Windows Forms app in C#.
1) Add the following code:
int t = 1;
while(true) {
int i = t;
t++;
}
2) Set a breakpoint on the while(true) line.
3) Hit the breakpoint, and press F10.
4) The debugger highlights t++; (The value of i is 1.)
5) Change the while(true) to while(t<10) and keep the breakpoint there.
6) Repeat Step 3.
7) The debugger highlights int i = t;
8) Repeat the entire thing using an ordinary Windows Forms app (not a PPC
app).
9) The debugger correctly stops on the first line regardless of the
loop type.

System: Windows Server 2003 with all patches as of this date.
(System is running inside VMWare).
Visual Studio 2003 with no patches or service packs.
PPC device HARD RESET.
..NET CF installed by VS2003 deployment process.

Maybe it's because I'm running in VMWare? Can anybody else repro this?
 
Hi,

Saint Stephen said:
Has anybody seen this? VS skips the first statement in a block while
single-stepping if the loop is WHILE(TRUE). (The code is executed, the
debugger just doesn't stop.)

I can confirm this. It also happens with my favorite "for (;;) {}" version
of an endless loop.

I also found that the debugger does not return from a single step (it simply
runs away) in various other situations, but I do not have another
reproducable example.

Andreas Selle
 
Back
Top