Hello,
I am trying to fix a bug on an ActiveX control. Is it possible to debug it from within Visual Studio 2008?
Hello,
I am trying to fix a bug on an ActiveX control. Is it possible to debug it from within Visual Studio 2008?
You should attach the debugger to the process which loaded the ActiveX component. If the latter has debug information you will be able to debug it as if it was a usual application.
If the host application refuses to load it and you suspect that some code responsible for the ActiveX initialization is broken you can attach to the process in advance and them do the action that will make the host application load the ActiveX.
If attaching to the process is a problem, just throw a DebugBreak() into the code you wish to debug. If VS is your JIT debugger, once the debug break command is reached you'll be asked whether you'd like to debug the process. Just say yes, and you're in.