Article ID: 46010
Article Last Modified on 10/23/2003
APPLIES TO
- Microsoft CodeView 4.1
- Microsoft CodeView 3.0
- Microsoft CodeView 3.0
- Microsoft CodeView 3.0
- Microsoft CodeView 4.0
- Microsoft CodeView 4.01
- Microsoft CodeView 4.01
- Microsoft CodeView 4.1
- Microsoft CodeView 3.0
- Microsoft CodeView 3.05
- Microsoft CodeView 3.06
- Microsoft CodeView 3.07
- Microsoft CodeView 4.0
- Microsoft CodeView 4.01
- Microsoft CodeView 4.1
This article was previously published under Q46010
SYMPTOMS
CodeView 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.
CAUSE
This behavior occurs because CodeView is line-based and the C compiler is token-based.
RESOLUTION
This 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 INFORMATION
The 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: kbbug kb16bitonly kbdebug kbprb KB46010