I finally got to the bottom of this. The delphi help isn't entirely useless,
but somewhat confusing.

1 From the Delphi IDE menu select Project|Options|and on the
Directories/Conditionals page, set the Debug Source Path to the component's
source file.
2 Then select Tools|Debugger Options. On the Language Exceptions, page
enable the exceptions you want to track.
3 Open the component source file and set breakpoints.

4 Select Run|Parameters and set the Host Application field to the name and
location of the Delphi executable file.

- here's the catch
- they mean set the Host Application to C:\Program
Files\Borland\Delphi6\Bin\delphi32.exe
this loads a new/second version of delphi with a blank form.

5 In the Run Parameters dialog, click the Load button to start a second
instance of Delphi.

- if the CPU debug dialog appears, press F9 to allow the new instance of
Delphi to start

6 Then drop the components to be tested on the form, which should break on
your breakpoints in the source.

- that is....drop your components on the form in the "loaded" second
instance of Delphi. It works.

Thanks Paul and Max for your help.

Todd.

----- Original Message -----
From: "Paul Heinz" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Tuesday, April 01, 2003 8:54 AM
Subject: RE: [DUG]: Testing Installed components


> Todd wrote:
>
> > I'm having trouble figuring out how to debug a visual control at design
> > time. I've created the source file "VisualControl.pas" and a new package
> > "dcontrols.dpk" which I've compiled and installed on the component
pallet.
> > Now I want to catch the OnResizeEvent of my control at design time, when
I
> > drop it on a form.
>
> [snip]
>
> > But which project should be currently open in the IDE? A new project
with
> > just a blank form? In which case, what is the Host application? I
> > only have a compiled package BPL containing the control, not an
> executable.
> > I can't make heads or tails of this.
>
> Yeah, Debugging Delphi with Delphi is awkward and not really documented.
>
> We (or I should say Max) found that you need to 'warm up' the Delphi
> debugging environment by running a delphi project which uses the control
in
> question with any desired breakpoints placed in the control code.
>
> Pressing F8 to single step to the first line is generally enough. It would
> seem some debugger initialisation is thus done which is necessary for this
> to all work.
>
> Then, you can use that 'warmed up' copy of Delphi to Attach (under the Run
> menu) to _another_ fresh copy of Delphi and it will debug correctly and
> catch any exceptions or breakpoints.
>
> I'm sure Max will correct me if I've missed any steps to do with getting
> breakpoints to work :-)
>
> TTFN,
>   Paul.
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to