[Lazarus] LazDaemon

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Jul 25 23:56:57 CEST 2014


On 2014-07-25 07:27, Michael Van Canneyt wrote:
> You can only do it by attaching to an external process.
> Start the service, and attach the debugger to it.
> 
> That obviously means that you will miss the startup code.

Further comments on this. You should be able to debug the startup code
by using the same trick I use for debugging CGI applications.

-------[ forwarded message of mine from long ago ]------------
In Delphi it is a common way to debug CGI applications. You define an
infinite loop in the CGI app. Execute the CGI app via the web browser.
The infinite loop then gives you a chance to attach the Delphi debugger.
You then modify the variable of the infinite loop so it exits the loop.
You can then step through the CGI application like any normal GUI or
Console app.
--------------[ end ]---------------------


This works with Lazarus too. But for Windows Services / Linux Daemons, I
still prefer the two application approach. One being the non-visual app,
and the other with a debug GUI.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the Lazarus mailing list