?
Solved

Debugging COM objects...

Posted on 2002-06-16
5
Medium Priority
?
529 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 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month10 days, left to enroll

762 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