views:

158

answers:

5

Hi,

I try to debug a COM dll (TAutoObject) in Delphi and my break point are not green.

I put my option like this :

  • host : c:\Program Files\Internet Explorer\iexplore.exe
  • param : c:\software\test.html

My test is well lanched but no breakpoint in Delphi

what is the way to to this ?

+1  A: 

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

Marco van de Voort
+6  A: 

you have to run the program which launchs the com+ object and then attach to process

Jonathan D
As I'm new on Delphi 2010, I think that it was different from Delphi 6 but in fact no.
Hugues Van Landeghem
naa its not, i spent a bit of time/hoping it would be but its not
Jonathan D
+2  A: 

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.

glob
Good to know, I thought I have problem with IE
Hugues Van Landeghem
A: 

you can also use tools like CodeSite.

Edwin
A: 

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.

skamradt