BUG: Visual Workbench Misses Breakpoint at Start of WinMain

ID: Q116314

1.00 1.50 WINDOWS kbtool kbbuglist

The information in this article applies to:

SYMPTOMS

The Visual Workbench debugger fails to stop at a breakpoint set on the opening brace ("{") of WinMain(). The problem only applies to the opening brace of the WinMain function.

RESOLUTION

To work around this problem, either:

STATUS

Microsoft has confirmed this to be a bug in Microsoft Visual WorkBench for Windows, versions 1.0 and 1.5. We are researching this problem and will post new information in the Microsoft Knowledge Base as it becomes available.

This problem does not occur in Visual WorkBench 32-bit, version 1.1.

MORE INFORMATION

The sample code below demonstrates the problem, but you can use any Windows application that contains debug information and a WinMain procedure to reproduce this problem: Set a breakpoint on the opening brace and on the return statement. Then choose Go from the Debug menu. The debugger skips the first breakpoint and stops on the return statement.

Sample Code

/* Compile options needed: /Zi /Od
*/ 

   #include <windows.h>

   int PASCAL WinMain(HINSTANCE hinstCurrent, HINSTANCE hinstPrevious,
       LPSTR lpszCmdLine, int nCmdShow)
   {
        return 0;
   }

Additional reference words: 1.00 1.50 KBCategory: kbtool kbbuglist KBSubcategory: WBDebug Keywords : kb16bitonly

Last Reviewed: July 23, 1997