Although COM technology has not been recommended by Microsoft, I still have a simple record of how to debug a COM component.
It's almost like debugging a normal DLL, a little different.
1. Creating COM components
Now use vs to create COM components is very easy, can use c++/vc++ or C #, indifferent C # to write COM components or relatively few, this example with VC + + writing.
2. Create a client invoke COM component.
After we create a COM component, we often call it to a third party, where the client does not have our code, only our DLL and usage instructions. When a third party calls a COM component, it may have a special case that requires us to locate the problem or modify the bug.
3. Debugging COM components
In the third party client feedback to us, we need to today's code debugging, through the following ways to do simple debugging,
3.1 Compile a debug version COM component and register it,
3.2 Run the client's application or write their own mock client,
3.3 Using vs to open the COM component code,
3.4 Attach COM project to the client (impersonation), if it is C # to open support native Debug.
This will enter the code when the client calls COM, and it can be debugged.
If you need to invoke COM when the client starts, set the external launcher below debug in VS, set the client's path, and start debugging directly F5.
From the above steps, COM component debugging and ordinary DLL debugging basically consistent, in addition to register a step.