ID: Q116312
1.00 1.50 1.51 WINDOWS kbtool kbfixlist kbbuglist
The information in this article applies to:
- Microsoft Visual C++ for Windows, versions 1.0, 1.5, and 1.51
When setting a breakpoint in the Visual Workbench or CodeView for Windows, using the breakpoint type "Break at Location If Expression has Changed" and specifying the expression as a BOOL (int) value causes the breakpoint not to be hit.
Microsoft has confirmed this to be a bug in the products listed at the beginning of this article. This problem was corrected in Visual C++ 1.52.
To reproduce this problem, use the FONTEST sample program and perform the following steps:
1. Start the debugger.
2. Load the file PRINT.C from the FONTEST project.
3. In the function InitPrinting, shown below, break on the line "bUserAbort
= FALSE:".
BOOL bUserAbort = TRUE;
BOOL PASCAL InitPrinting(HDC hdc, HWND hWnd, LPSTR msg)
{
HANDLE hInst = GetWindowWord(hWnd, GWW_HINSTANCE);
bError = FALSE;
bUserAbort = FALSE; /* Set breakpoint here. */
}
4. To set a breakpoint, choose the Breakpoints option from the Data menu in
CodeView for Windows or from the Debug menu in the Visual Workbench.
Set the breakpoint with the following attributes:
Type: Break At Location If Expression has Changed
Where: At line 75 in print.c
Expression: {InitPrinting}bUserAbort
Length: 1
5. Choose Add from the dialog box, and then select Close to save the
breakpoints.
6. Return to the main menu. Choose Go from the Run menu in CodeView for
Windows (or from the Debug menu in the Visual Workbench) to start the
application.
The debugger never stops at the breakpoint, although it should because the
value of bUserAbort changes from TRUE to FALSE at that location.
Additional reference words: 1.00 1.50 Boolean KBCategory: kbtool kbfixlist kbbuglist KBSubcategory: WBDebug
Keywords : kb16bitonly kbDebug kbide kbbuglist kbfixlist
Version : 1.00 1.50 1.51
Platform : WINDOWS
Solution Type : kbfix
Last Reviewed: September 22, 1997