Debugging Unmanaged ActiveX or COM

J

jpuopolo

All:

I have developed an ActiveX control using unmanaged C++ (MFC).
I have also developed a C# application to server as a test harness.
Both ActiveX and test harness application are built in Debug mode.
The VS.NET (2005) project is configured for native debugging.

In the debugger, when I try to "step into" the ActiveX method, the
debugger executes the code but does not enable me to "step into" - it
behaves just like a "step over."

Has anyone used VS.NET 2003/2005 to successfully debug an ActiveX or
unmanaged COM component?

Many thanks,
jpuopolo
 
N

Nicholas Paldino [.NET/C# MVP]

jpuopolo,

You need to go to your project settings and select "enable unmanaged
debugging". This should allow you to step from managed code into unmanaged
code.

Hope this helps.
 
J

jpuopolo

Nicholas:

Thanks, but I already tried that (in my original post as well). The
ONLY way that I have found that works is to run the ActiveX control in
the debugger by setting the host application to my test harness. This
seems to work.

So, instead of being in my test harness and starting the debugger, I go
to my ActiveX project and Debug... The EXE associated with the debugger
is the test harness EXE and I am able to debug the control.

Hope this helps some others out there...

Best,
jpuopolo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top