The information in this article applies to:
SYMPTOMSIf you set a breakpoint with a skip count, the debugger behaves correctly and stops at the breakpoint for the first time after skipping the breakpoint the number of counts specified. However, after the first pass the breakpoint is hit every time without skipping the breakpoint for the specified counts. CAUSEThe debugger resets the skip count to 0 after the first pass. RESOLUTIONSee the MORE INFORMATION section for a workaround. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONThe skip count feature is very useful in a loop where you want to stop inside the loop after skipping a line of code for a certain number of times. The following sample describes a situation of this nature. Steps to Reproduce BehaviorBuild the following code with debug information.
Set a breakpoint on the line shown and press the F5 key (Debug Go). The
debugger will stop at this line of code. The Auto window will show the
value of i to be 0. Press the F5 key. Again, the debugger stops at the
breakpoint and the value of i is shown to be 1.
WorkaroundChange the skip count to a value other than the last set using Condition. For example set it to 0, click OK, and go back to main dialog box. Set Condition to 5, click OK, and click OK again to close the main dialog box. Press the F5 key, and the breakpoint is skipped 5 times. You must repeat this process every time you want to skip more than once.Alternatively, if your loop has a count variable like "i" in the sample code above, you can use conditional breakpoint to get the same effect. Set breakpoint to break when 'i % 5 == 0' is true. Additional query words:
Keywords : kbDebug kbide kbVC500bug kbVC600bug |
Last Reviewed: May 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |