How to Debug WEP(), _WEP(), and ExitInstance() in 16-bit DLLsID: Q148734
|
The Visual C++ Workbench debugger does not support debugging the Windows
Exit Procedure (WEP) or functions called from WEP for implicitly loaded
DLLs. CodeView for Windows does support debugging WEPs but only if the
calling application is not the application being debugged by CodeView for
Windows.
Breakpoints set through the debugger or DebugBreak() will not be hit. MFC
TRACE() statements and OutputDebugString() messages will not show up in the
debug window. However, DBWIN can be used to see these debug messages. DBWIN
can be started from the Program Manager by opening the DebugWin icon or by
running Dbwin.exe from the Msvc\Bin directory.
NOTE: CodeView requires Windows 3.1 and is not compatible with Windows NT
or Windows 95.
Both the Workbench debugger and CodeView for Windows stop debugging when
the main application being debugged exits. This occurs before the
implicitly linked DLLs are actually unloaded from memory and their Windows
Exit Procedures (WEPs) are called.
By default, the Windows Exit Procedure (WEP) is implemented by the C
Run-Time (CRT). The CRT version of WEP calls _WEP(), the user-defined
Windows Exit Procedure. In MFC _USRDLLs, _WEP() in turn calls
ExitInstance(). Also, all destructors for static C++ objects are called
from the default CRT WEP. This debugger limitation applies to all of these
functions.
For more information on why breakpoints fail, please see the following article in the Microsoft Knowledge Base:
Q121556 PRB: Breakpoints Won't Work - 11 Reasons WhyThis article covers, among other things, why breakpoints may not work in MFC source code files. See the "Breakpoints Fail When Multiple Source Files Have the Same Name" section for more information.
Additional query words: 1.00 1.50 kbinf CVW
Keywords : kb16bitonly kbCodeView kbDebug kbDLL kbide kbMFC kbVC
Version : 1.00 1.50 1.51 1.52
Platform : WINDOWS
Issue type :
Last Reviewed: July 26, 1999