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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to debug a com object? 1

Status
Not open for further replies.

WilliamMathias

Programmer
Sep 8, 2001
34
GB
Hi,

I've written my 1st com object, in VB, it compiles, I've run regsvr32.exe and added the object to my project references.

How can I debug my com object, can I step thru it?

Do I run 2 versions of VB?

 
The simplest thing to include the source code inside you "test Bed" project.You will not be able to use CreateObject during test but so what. If you insist on running two vbs, you'll have to put both in IDE mode, do Start Full Compile on the Com IDE, add a reference to COM IDE to the test IDE and test. Everytime you exit the COM IDE full compile, you will hae to drop the reference in the test bed and start all over.

I've done it both ways and I chose to use one IDE.
 
Thanks for your reply,

If I do want to use 2 IDE's

How do I put a project in IDE mode?

Cheers,

Will
 
Hi All,

Yes use 2 instances of VB.

This is the best way I've found to test COM Objects. Open the dll's source code in an instance of vb and then run the project (dll) so its in memory. Then open the project which references the dll, place a breakpoint in the code. When run it will pick up the instance of the COM object in memory and will switch between projects as you step through the code.

Codefish
 
You can also add multiple projects in VB to a "project group", but my personal preference is to open multiple copies of VB.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top