PRB: CodeView Skips Over a Line of Source CodeLast reviewed: August 7, 1997Article ID: Q46010 |
The information in this article applies to:
SYMPTOMSCodeView does not recognize a breakpoint set in an application. If you run the program, execution does not stop on the breakpoint. If you single-step through the code, CodeView steps past the specified line. This problem also occurs in the QuickC and Visual C++ integrated debuggers.
CAUSEThis behavior occurs because CodeView is line-based and the C compiler is token-based.
RESOLUTIONThis restriction is inherent in the CodeView design. To work around this behavior, select mixed source code and assembly language mode and place the breakpoint on the correct line of assembly language code.
MORE INFORMATIONThe following sample code can be used to demonstrate this problem.
Sample Code
/* * Compile options needed: /Zi /Od */ int i, j, k, l; void main(void) { for (i = 0; i < 20; i++) { j = 0; for (k = 0; k < 20; k++) if (j == 0) break; j = 1; /*** set breakpoint here ***/ } l = 0; } Keywords : CvwIss kb16bitonly kbcode Version : 2.2 3.0 3.11 3.14 4.0 4.01 4.25 Platform : MS-DOS OS/2 WINDOWS Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |