Re: [Lazarus] debugging a CGI

2021-01-22 Thread Bo Berglund via lazarus
On Wed, 20 Jan 2021 11:13:33 +0100 (CET), Michael Van Canneyt via lazarus wrote: > > >On Wed, 20 Jan 2021, Bo Berglund via lazarus wrote: > >> On Tue, 19 Jan 2021 23:31:27 +0100 (CET), Michael Van Canneyt via lazarus >> wrote: >> >>> Start a 'HTTP server application' in lazarus, add your web mod

Re: [Lazarus] debugging a CGI

2021-01-20 Thread duilio foschi via lazarus
I guess I will use conditional compilation. {$IFDEF WINDOWS} // this means I am debugging the CGI on my PC //read from file xxx.json {$else} // this means the CGI is in production on my linux server // read from stdin {$endif} Thank you for your help Duilio On Wed, Jan 20, 2021 at 1:33 PM M

Re: [Lazarus] debugging a CGI

2021-01-20 Thread Martin Frb via lazarus
On 19/01/2021 19:03, duilio foschi via lazarus wrote: I would like to debug a CGI by tracing it in Lazarus IDE as a console application in windows. Is there a way to have the CGI read from standard input at start time? I have not tried this, but you may try to debug it using gdbserver. Tool

Re: [Lazarus] debugging a CGI

2021-01-20 Thread Michael Van Canneyt via lazarus
On Wed, 20 Jan 2021, Bo Berglund via lazarus wrote: On Tue, 19 Jan 2021 23:31:27 +0100 (CET), Michael Van Canneyt via lazarus wrote: Start a 'HTTP server application' in lazarus, add your web module unit to it and run it. (you may need to add some more units or packages, in essence the same

Re: [Lazarus] debugging a CGI

2021-01-20 Thread Bo Berglund via lazarus
On Tue, 19 Jan 2021 23:31:27 +0100 (CET), Michael Van Canneyt via lazarus wrote: >Start a 'HTTP server application' in lazarus, add your web module unit to it >and run it. (you may need to add some more units or packages, in essence the >same oneas as in your CGI application). This is interestin

Re: [Lazarus] debugging a CGI

2021-01-19 Thread Michael Van Canneyt via lazarus
On Tue, 19 Jan 2021, duilio foschi via lazarus wrote: How can I trace the code then? It's a normal Lazarus application. You can just debug the application like any other. Start a 'HTTP server application' in lazarus, add your web module unit to it and run it. (you may need to add some mor

Re: [Lazarus] debugging a CGI

2021-01-19 Thread duilio foschi via lazarus
How can I trace the code then? On Tue, Jan 19, 2021, 22:11 Michael Van Canneyt via lazarus < lazarus@lists.lazarus-ide.org> wrote: > > > On Tue, 19 Jan 2021, duilio foschi via lazarus wrote: > > > I would like to debug a CGI by tracing it in Lazarus IDE as a console > > application in windows. >

Re: [Lazarus] debugging a CGI

2021-01-19 Thread Michael Van Canneyt via lazarus
On Tue, 19 Jan 2021, duilio foschi via lazarus wrote: I would like to debug a CGI by tracing it in Lazarus IDE as a console application in windows. Is there a way to have the CGI read from standard input at start time? I recommend to host your webmodule in a http server app, this will make

[Lazarus] debugging a CGI

2021-01-19 Thread duilio foschi via lazarus
I would like to debug a CGI by tracing it in Lazarus IDE as a console application in windows. Is there a way to have the CGI read from standard input at start time? Thank you Duilio -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lis