Sparky191
asked on
Debugging a VB6 OCX in a VB6 project
I'm trying to debug a VB6 OCX (activeX) in a VB6 project and I can't get it working. I have the OCX and the project file. I create a new project with a blank form and add the OCX component and I can't step into it. If I open up the project and add a form and then try to debug it, it doesn't run.
Whats the correct way to debug this?
Whats the correct way to debug this?
Do you have the source code of the ocx and the project opened along with your executable project? If yes add the following statement... 'debug.assert false' one line before the code where you want to debug. The VB compiler should break at this point.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was already trying it with both projects open and the ocx on the new form, but it wouldn't step into the code. Someone elsewhere suggested I should add the vbp rather than the ocx as a component. This intially apeared as an option and then disappeared and now has reappeared so I did that and its now working. But I didn't know about the "Set as Startup" so I'll try that with a new project and see if it works.