Reputation: 8259
I am trying to fix a bug on an ActiveX control. Is it possible to debug it from within Visual Studio 2008?
Upvotes: 4
Views: 2409
Reputation: 310
ActiveX is not a stand alone application. Usually, it is used within a container application.
I suggest using the Message Boxes
and alerts
.
Hope this will help.
Upvotes: 0
Reputation: 22020
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.
Upvotes: 5
Reputation: 170489
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.
Upvotes: 1