We have written an ActiveX application in VB 6.0 which hosts in VC++ dll. We want to debug that code using the VB classic IDE. We are unable to debug it, because it does not hit the breakpoint we have set. How do I debug an ActiveX application using the VB classic IDE?
-
What issues are you experiencing when trying to debug? – nyanpasu64 Aug 03 '18 at 09:24
-
Breakpoint is not getting hit in vb classic 6.0 ide – KISHOR RANA Aug 03 '18 at 09:30
-
I've increased the readability of your question by cleaning up the grammar and added your clarification comment inside the actual question, because it is critical information for anyone trying to answer. Lastly I have added an explicit question to the question body based on your title, but you may want to verify this is actually what you wanted to ask. I am not sure what you mean with "which hosts in VC++ dll", so you probably need to edit that yourself to make it more clear what you mean. – Sumurai8 Aug 03 '18 at 09:47
-
Your title mentions "VB Script", and your tag and body mention "VB 6". Can you confirm that you actually mean VB6 and change the title if so? – Aug 03 '18 at 13:47
-
sorry,It is actually VB 6.0 classic . – KISHOR RANA Aug 06 '18 at 05:49
2 Answers
If you start your ActiveX DLL project in the VB 6 IDE, and then create components from some other application (your C++ application, or testing it via another VB Project or any other language which can use the COM object), it should load the object in the debugger and you can set breakpoints and look at variables while running. Refer to "Testing and Debugging ActiveX Components" in the Visual Basic 6 Concepts Guide.
If that's not working for you, can you make a MCVE of the problem you're having, by creating a new simple ActiveX DLL component and calling it from a separate project (you may want to try calling it from more than one language), and reproduce the issue you're having to clarify what isn't working for you?
You probably have "Break on Unhandled Errors" selected in the IDE. If you do, then any error in your ActiveX object will set the breakpoint on the line of the client that accesses the object, typically a method call. If this is the behavior that you are getting ("does not hit the breakpoint that we have set" doesn't make this clear), then that is almost certainly the problem.
In any case, I would suggest that you check this. You should have "Break in Class Module" selected. For a full explanation of the different ways to handle breakpoints, and how to change the settings, see this post. Here also is the doc on the subject.

- 5,990
- 2
- 24
- 26