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/

Reply via email to