Share via


Debugging COM Applications

ActiveX applications perform a number of tasks outside of the programmer’s direct control. Communication between DLLs, usage counts on objects, and Clipboard operations are just a few of the areas where you may encounter unexpected behavior. Usually when this happens, your first step is to track down the source of the problem. The difficulty with ActiveX applications is that it isn’t always obvious how to debug a particular problem. This series of topics describes techniques you can use to track down problems, some of which are unique to ActiveX applications. It also introduces you to the special tools and testing aids available to help you write solid ActiveX applications.

Debugging ActiveX applications begins with the same general debugging techniques you use in other kinds of applications. For more information, see and Using MFC Debugging Support.

Tip   When you’re debugging an ActiveX server and container, start up two instances of Visual C++, load the container into one, and the server into the other, set appropriate breakpoints in each, and debug. When the container makes a call into the server that hits a breakpoint, the container will wait until the server code returns (that is, until you finish debugging it). You can also trace into calls that go across process boundaries. For more information on tracing into these calls, see The Trace Macro.