Solved

Debugging COM objects...

Posted on 2002-06-16
5
520 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 100
Convert Jpg /PNG To GIF 5 135
Tidtcpserver listening on multiports? 1 27
Firemonkey allowing RTL on android 6 32
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

772 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