Board index » delphi » How to debug a Delphi DLL??????

How to debug a Delphi DLL??????

Hi..

How do you debug a Delphi DLL???  I have some commented out code which
allows it to run as an application,  but really need to figure out how to
debug it as a DLL?  Visual C++ allows you to debug a DLL,  so I know it can
be done.  Just how???

 

Re:How to debug a Delphi DLL??????


I put alot of showmessage statements throughout my dll code.  A bit
hokey, but at least I can tell how far a program executes by the last
message I see.

Quote
Nik Foscarini wrote:

> Hi..

> How do you debug a Delphi DLL???  I have some commented out code which
> allows it to run as an application,  but really need to figure out how to
> debug it as a DLL?  Visual C++ allows you to debug a DLL,  so I know it can
> be done.  Just how???

--
Tim Victor
350 Steeplechase Drive
Exton PA 19341
------------------------
tvic...@erols.com
------------------------

Re:How to debug a Delphi DLL??????


Do you want to know what we do?.........
We create the thing as an exe, debug it, then convert to a DLL as you
cannot debug
a DLL in Delphi (1.0), if anyone else knows differently, please let me know
too! Thanks
peter_ju...@hotmail.com

Nik Foscarini <nfoscar...@insystems.com> wrote in article
<5j0ss4$...@news1.pritel.net>...

Quote
> Hi..

> How do you debug a Delphi DLL???  I have some commented out code which
> allows it to run as an application,  but really need to figure out how to
> debug it as a DLL?  Visual C++ allows you to debug a DLL,  so I know it
can
> be done.  Just how???

Re:How to debug a Delphi DLL??????


Wait for Delphi3...

Re:How to debug a Delphi DLL??????


In article <33542321.2...@erols.com>, Tim Victor <tvic...@erols.com>
writes

Quote

>I put alot of showmessage statements throughout my dll code.  A bit
>hokey, but at least I can tell how far a program executes by the last
>message I see.

Phew! At least I'm not alone in feeling "hokey" about ShowMessage in
dlls. :-)

Another method I use is to have the DLL periodically write to a text
file, that way I avoid the overhead of the dialogs unit, plus I get a
permanent record of what's going on in the code.
Jeremy Collins

"There's a cool web of language draws us in,
    Retreat from too much joy or too much fear"
-Robert Graves, 'The Cool Web', 1927

http://www.jcollins.demon.co.uk

Re:How to debug a Delphi DLL??????


M&C <ma...@gol.com> wrote in article <01bc4a03$ac621e40$f631f3ca@marcus>...

Quote

> Do you want to know what we do?.........
> We create the thing as an exe, debug it, then convert to a DLL as you
> cannot debug
> a DLL in Delphi (1.0), if anyone else knows differently, please let me
know
> too! Thanks
> peter_ju...@hotmail.com

Yes you can debug a DLL in D1, and sometimes you have to, since code
running in an executable can behave differently from the same code running
in a DLL, since there are subtle differences in the code's environment. The
way you do it is via TurboDe{*word*81} (in the RAD pack). You build an app
which calles the DLL code you want to debug. You compile this with TDW
info, and also build the DLL iwth the same info. You load the app into TDW
and then load the DLL that it refers to (it's a little tricky, but you can
do it). You are then in a position to step into the DLL code.

--
Regards, Stephen Walter

Re:How to debug a Delphi DLL??????


Hold your work for few days. Delphi 3.0 supports dll debugging. ;-)
--
Pavel Hlavnicka
e-mail: pa...@asei.cz
-----------------------------------------------------

Re:How to debug a Delphi DLL??????


At this stage, to do the debugging in real time you will have to get a copy
of the Turbo De{*word*81}. This allows you to specify which modules you wish to
debug.

One feature of the forthcoming Delphi 3.0 is the ability to debug DLL's. It
does this in the same way as VC++ by allowing the user to specify an
executable to start the process off.
--
Glen Swindell
<gswind...@csm.co.uk>

Nik Foscarini <nfoscar...@insystems.com> wrote in article
<5j0ss4$...@news1.pritel.net>...

Quote
> Hi..

> How do you debug a Delphi DLL???  I have some commented out code which
> allows it to run as an application,  but really need to figure out how to
> debug it as a DLL?  Visual C++ allows you to debug a DLL,  so I know it
can
> be done.  Just how???

Re:How to debug a Delphi DLL??????


Just use the standard Turbo De{*word*81}, TD32. It comes with C++ and
you can probably buy it separately.

David Jameson

--------------------------------
IBM Research, Yorktown Heights
For exciting C++ and Delphi programming opportunies,
see http://www.research.ibm.com/music

Re:How to debug a Delphi DLL??????


Quote
In article <33542321.2...@erols.com> Tim Victor <tvic...@erols.com> writes:
>I put alot of showmessage statements throughout my dll code.  A bit
>hokey, but at least I can tell how far a program executes by the last
>message I see.
>Nik Foscarini wrote:

>> Hi..

>> How do you debug a Delphi DLL???  I have some commented out code which
>> allows it to run as an application,  but really need to figure out how to
>> debug it as a DLL?  Visual C++ allows you to debug a DLL,  so I know it can
>> be done.  Just how???

Delphi-1 does have problems doing this, and normally I use Turbo De{*word*81} for
the task.  Delphi-2 is much simpler.

Re:How to debug a Delphi DLL??????


On Wed, 16 Apr 1997 08:23:38 +0100, Jeremy Collins

Quote
<j...@jcollins.demon.co.uk> wrote:
>Another method I use is to have the DLL periodically write to a text
>file, that way I avoid the overhead of the dialogs unit, plus I get a
>permanent record of what's going on in the code.

Been there, and still do that. :-)

JE McTaggart

Re:How to debug a Delphi DLL??????


Quote
"Nik Foscarini" <nfoscar...@insystems.com> wrote:
>Hi..

>How do you debug a Delphi DLL???  I have some commented out code which
>allows it to run as an application,  but really need to figure out how to
>debug it as a DLL?  Visual C++ allows you to debug a DLL,  so I know it can
>be done.  Just how???

WinIce 3.0 support Delphi 2.x : www.numega.com.

Re:How to debug a Delphi DLL??????


Why not debug it as a UNIT before you turn it into a LIBRARY?

Harald

Quote
> >Hi..

> >How do you debug a Delphi DLL???  I have some commented out code which

Re:How to debug a Delphi DLL??????


Quote
Harald Fjerdingstad wrote:

> Why not debug it as a UNIT before you turn it into a LIBRARY?

> Harald

> > >Hi..

> > >How do you debug a Delphi DLL???  I have some commented out code which

Delphi 3 let's you debug DLL's.

Harald

(yes, another one of those....)

Other Threads