Solved

Debugging COM objects...

Posted on 2002-06-16
5
524 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 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