How To Debug a Dynamic-Link Library (DLL) in Windows
Retired KB Content Disclaimer
- Build the DLL with debugging information.
- Specify the fully-qualified path to the calling application. In Visual C++ for Windows and Visual C++ 32-bit Edition version 1.0, choose Debug from the Options menu and enter the information under Calling Program. In Visual C++ 2.x and 5.0, choose Settings from the Project menu; in Visual C++ 4.0, choose Settings from the Build menu. Select the Debug tab, and enter the information under Executable For Debug Session.
- Set a breakpoint in the source code of the DLL function to debug. To do this, place the cursor on the line in the source code to contain the breakpoint and press F9.
- Choose Restart from the Debug menu. If the calling program does not contain debugging information, a dialog box appears asking you to confirm your choice. Choose OK and the program starts execution.
- After you perform the necessary steps to execute the function that contains the breakpoint, execution stops on the specified line of code.
Article ID: 85221 - Last Review: 07/15/2004 16:22:09 - Revision: 3.1
- kbbug kbdebug kbhowto kbhowtomaster kbide KB85221