BUG: Visual Workbench Debugger May Not Break in a ConstructorLast reviewed: July 22, 1997Article ID: Q104636 |
1.00 1.50
WINDOWS
kbtool kbbuglist
The information in this article applies to:
SYMPTOMSThe Visual Workbench debugger does not stop at the breakpoint in a constructor called when a global object is instantiated in a C++ program.
RESOLUTIONA possible workaround is to add an interrupt 3 call to force the debugger to break inside the constructor, and then begin debugging from the interrupt 3 call. The code would resemble the following:
_asm int 3Another workaround is to use the CodeView debugger with Visual C++ Professional Edition 1.0.
STATUSMicrosoft has confirmed this to be a problem in Microsoft Visual Workbench debugger. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. This problem does not occur in Microsoft Visual C++ 32-bit Edition, version 1.0.
MORE INFORMATIONThe following sample program demonstrates the problem. To reproduce the problem in the Visual Workbench debugger, compile and link the sample as a QuickWin program or place the similar code in a Windows program. Then you can set a breakpoint on the cout statement and press F5.
Sample Code
#include <iostream.h>class test{ int a; public: test(); }; test::test(){ a=0; cout<<"This is inside constructor"; //Set a breakpoint here. };test dummy; test *ptr=new test; // This call should be fine. void main(){ }
|
Additional reference words: 1.00 1.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |