Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I debug an ActiveX exe in Visual Basic 6 1

Status
Not open for further replies.

mpdillon

Programmer
Jan 27, 2004
18
0
0
US
Hi,
I am creating an ActiveX exe. Currently, I can only debug it by adding msgboxes, recompiling and running the calling application. Is there a better way? I would like to be able to step through the code of the ActiveX exe to see what is going on.
thanks,
pat
 

Open ActiveX project and place any breakpoints or watches you want. Then start it with "Start with Full Compile". Then you can use other project that calls/uses your ActiveX and you can debug both.

Good Luck

 
Thanks, vb5prgrmr. I had been playing around with that before but could not get it to work. It is good to know that I was on the right track.
However, I am still having dificulty. I get a error 430; Class does not support Automation or does not support expected interface. I searched on line for the error and chased a few leads but couldn't get rid of it. So I created two new projects. A standard EXE and a ActiveX EXE.
I tried to keep these as simple as possible to better understand what is going on. I used all the default settings but did rename the ActiveX EXE project name to WPExe. The code in the Class1 of the ActiveX Exe is
Sub StartHere
Msgbox "A"
End sub
With no additional code I made the ActiveX EXE.

In the Standard EXE I added a module, deleted the form, Referenced the compiled ActiveX EXE and added this code to Module1

Option Explicit
public objWP as new Class1

sub Main
msgbox "1"
objwp.starthere
end sub

I made an EXE for the Standard EXE.

Following your directions, I opened the ActiveX EXE, placed a break point at "Msgbox "A"" and choose run with full compile. On the Debugging screen of the Project Properties I referenced the calling program. It started fine(it displayed the Msgbox "1") but when it called the ActiveX EXE I received the Error 430 above. Since the two projects are so basic, I must assume I have something set up incorrectly. Could you offer any further assistnace?

Thanks,
Pat
 

Run the ActiveX with the full compile. Then switch to a NEW (for now) project and add your reference and your code and see if that works.

I belive (could be wrong) but my impression is you must reference the current running ActiveX. So if you happen to stop the ActiveX you will have to dereference it from the test project and then reference it again when you start the ActiveX again.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top