April 8th, 2011, 07:29 AM
How do I use a breakpoint in an MFC ActiveX control?
I am using VS 2008. I have an MFC ActiveX control that will be used by an application written in old-fashioned unmanaged C++. The ActiveX control is also unmanaged C++. I am intentionally raising an exception in the control. It is not raising the type of exception I expect. I want to step into the control's code. But when I put a breakpoint in and set the control project's debug application to the target application and then run it, the debug marker changes from the familiar dark red circle to a faint red outlined circle, and if I hover my mouse over it, a tooltip tells me that symbols for my file have not been loaded. The same thing happns if I start the application first and then try to use the debugger's attach to process function.
So how do I step from my aplication's code to my control's code?
RobR, wondering why ActiveX appears to be such a poorly thought out, untested afterthought in VS 2008 C++ (and it wasn't much better in VC++ 6). But perhaps all of unmanaged C++ is an untested, poorly thought out afterthought in VS 2008.
April 8th, 2011, 01:14 PM
Re: How do I use a breakpoint in an MFC ActiveX control?
Most likely you have more than one copy of that ActiveX dll on your system, and the one loaded is NOT the same as the one you are trying to debug.
Vlad - MS MVP
[2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
- replacement windows manager for Visual Studio, and more...
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!