BUG: Unable to Hit Breakpoint on ELSE IF StatementLast reviewed: May 27, 1997Article ID: Q117384 |
The information in this article applies to:
SYMPTOMSIf the sample code in the "MORE INFORMATION" section, below, is compiled for debugging (/Zi), the debugger (either CodeView or the Visual Workbench) does not stop at a breakpoint that is placed on the ELSE IF statement.
CAUSEThe compiler does not generate the correct symbolic information for the line of code containing the ELSE IF statement.
RESOLUTIONTo work around the problem, place the "else" and "if" statements on separate lines. For example:
else if (i==7) STATUSMicrosoft has confirmed this to be a bug in the products listed at the top of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONTo reproduce this problem with the sample code below:
In CodeView, if you switch into mixed source/assembly mode, you can verify that there is executable code associated with the ELSE IF statement. If a breakpoint is placed on one of the lines of assembly code for the ELSE IF statement and the application is debugged, the code stops running at the breakpoint. With the Visual Workbench debugger, step through the code at the ELSE IF statement to set the breakpoint.
Sample Code
/* Compile options needed: /Zi /Od */ void main(void) { int i=100; if (i==2); else if(i==7); /* cannot stop on this line */ } |
Additional reference words: 6.00 8.00 8.00c 9.00 10.00 10.10 10.20
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |