Solved

Debugging COM objects...

Posted on 2002-06-16
5
518 Views
Last Modified: 2010-04-04
Hi All,

I have an annoying problem trying to debug a COM object implemented in a DLL.

In the DLL delphi project I can set the host application and then run the EXE/DLL - the application runs and creates an instance of the COM object using CreateCOMObject (with the appropriate GUID).

However, Delphi does not stop on any of the breakpoints I set in the code. I have verified that the code is in fact running (added a message etc), so I am quite confused as to why it does not break!

I have had no difficulties debugging into ordinary DLLs, but this COM object in DLL doesn't want to play ball ;-(

Does anyone have tips on how they debug their in-process COM objects?

Cheers,

Raymond.
0
Comment
Question by:rwilson032697
  • 3
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
Robn earned 100 total points
ID: 8294752
I'm not sure what version of Delphi you are running but in Delphi 7, there is a flag that can be checked in the Tools / Debugger options section called "Enable COM cross-process support".

support     Cross-process stepping option that lets you step into remote COM processes while debugging. Also, adds COM events to the event log. This option is off by default. (This option may not appear in all editions of the product.)

Hope this helps.

Regards,
Rob
0
 
LVL 12

Author Comment

by:rwilson032697
ID: 8295194
Hi Rob,

Thanks for the tip wrt Delphi 7 - I like the sound of teh cross process step into support! Currently we are using D6 but will upgrade soon (hopefully :-)

It's a perplexing problem all right, and annoying because you end up having to rely on logging to see what is happening. I suspect it may be a subtle conflict or misconfiguration when the OS goes looking for an active instance of the COM server...

Cheers,

Raymond.
0
 
LVL 2

Expert Comment

by:Robn
ID: 8295280
No problem.
However, I was unable to determine if you got the problem fixed from your last post.
You can also try placing the COM object in the same project group as the host application. Build all projects to rebuild the symbol tables and try debugging it again.

Hope this helps.

Regards,
Rob
0
 
LVL 12

Author Comment

by:rwilson032697
ID: 8295308
Ho - it is still an existing problem, but one I won't be revisiting until I need to visit that particular dungeon again.

What the hell - you've been the only person to even reply so you deserve the points just for the D7 tips! :-)

Cheers,

Raymond.
0
 
LVL 2

Expert Comment

by:Robn
ID: 8295357
Thank you very much Raymond.
I hope you find the answer your looking for. I'll keep my eye on this topic in the event you visit that particular dungeon again. :)

Regards,
Rob
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now