Visual C++ Debugging: How do I debug my ActiveX/COM component?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 1 of 1

Thread: Visual C++ Debugging: How do I debug my ActiveX/COM component?

  1. #1
    Join Date
    Mar 2003
    India {Mumbai};

    Post Visual C++ Debugging: How do I debug my ActiveX/COM component?

    Q: I have developed an COM component/ActiveX control in VC++. Now I want to Debug this component/control. How can I do this?

    A: If you have an ActiveX control, it can be tested in its container application (ActiveX Test Container, Visual Basic...). But if you want to debug it as you do any other normal application in VC++, you need to debug the executable (an EXE).

    There are several ways (specific to VC6):

    First Method:
    • Start the container application (for instance Visual Basic).
    • Open Visual Studio, Load your project (ActiveX, COM or any other DLL project you want to debug).
    • Place the necessay breakpoints in your project. You can also place DebugBreak API or 'ASSERT(FALSE)' macro to the place from where you want debugging.
    • Launch 'Attach to Process' dialog box through 'Build ->Start Debug -> Attach to Process' menu option.
    • Here select the container application you started, in which you want to test your object. (VB6.EXE, as per example case I mentioned).
    • Now in container application, place the ActiveX control or create the instance of COM object, if it is not ActiveX control.
    • Test the control by running application. (The form application, if VB used).
    Now the container application (VB6.EXE) is being debugged by VS6 (including other binary loads, DLLs, OCXs...).

    Another way:

    For the DLL you want to debug, set the container application's EXE path (in which you'll be using your component) to 'Executable for Debug Session' in 'Linker' settings.

    Last edited by Andreas Masur; July 25th, 2005 at 01:18 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Azure Activities Information Page

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


HTML5 Development Center