Reputation: 6808
I try to debug a COM dll (TAutoObject) in Delphi and my break point are not green.
I put my option like this :
My test is well lanched but no breakpoint in Delphi
what is the way to to this ?
Upvotes: 0
Views: 2616
Reputation: 71
This is offered a long time after the original request. However I have been struggling with a similar issue and now resolved it. I use XE7 with W10. Both the COM (Active-X) dll and the application using it are my code. As above, I specified my app as the host application, the just ran the dll with debugs added. The host app worked OK but the debugs were crossed out. The solution was that Windows (10) was not running the debug version - it was running a previous registered version. So after compiling the dll in the debug folder of the dll source I re-registered the dll in Windows and that sorted the issue. The debugs worked as in a normal program. Hope this helps.
Upvotes: 0
Reputation: 1364
You have to run the program which launches the COM+ object and then attach it to the process.
Upvotes: 8
Reputation: 5049
This link Breakpoint not honored while debugging a DLL helped me debug my com dll in Delphi 5. Go to Project -> Options -> Linker -> check mark "Include remote debug symbols". I couldn't tell you why it worked. Delphi 5's help provided the following description:
Include remote debug symbols Check this if you are using remote debugging.
Upvotes: 1
Reputation: 15538
You also need to have integrated debugging turned on. Its on the general tab of the debugger options.
In the past what I have done is to create a separate program which invoked my COM object and used it as the target for debugging rather than the standard host. This simplifies things and also allows you to create specific repeatable tests of known issues to aid in smoke testing later.
Upvotes: 0
Reputation: 26358
Since the debugger doesn't start the file, that won't work.
IIRC you can try to "attach to process" to the process running it (iexplorer.exe), but the problem is that that doesn't allow to debug through the start of the component. (since it costs time to manually attach)
I had a different setup where I instantiated a very slightly differently compiled .ocx on a panel of a delphi app, and used that to debug. Which worked fine.d
Upvotes: 1
Reputation: 2960
IE launches a sub-process which hosts non-trusted code. this is probably why your debugging settings are not working, and why attaching to the process once launched works.
Upvotes: 2