Yes I mean a console applcation which Lazarus calls a Program.
I certainly am talking about the same thing: debugging my program.
Its a rather complex multithreaded application server. When started the user can give commands at the prompt to (de)activate the server, or shut it down.
With Lazarus/win32 the program stops at all breakpoints declared. Also I get a terminal window.
With Lazarus/Linux-x86_64-gtk, with the same source files I have debugging problems.
One problem, location in source mismatch, is solved by running "Clean directory". In my opinion this shouldn't be necessary.
Another problem is that when I set the GNU debugger (in "Debugger Options") and run the program, I don't get the terminal window. When setting debugger to "[none]" a get the terminal window, as expected. It seems now that a problem with breakpoints in units that are skipped is related to the fact that the terminal windows doesn't appear. It looks like the programs hangs somewhere.
I've found that even from a simple program I don't get a terminal:
program Project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Classes
{ add your units here };
var
Command: Char;
KeepListening: Boolean;
begin
KeepListening := True;
while KeepListening do
begin
write('>');
readln(Command);
case Command of
'c': writeln('continue');
'q': begin
writeln ('quit');
KeepListening := False;
end;
end;
end;
end.
Indeed, now I don't think anymore the problem arises from my lack of knowlegde of the GNU-debugger. I looks like a clear case for a bug report, doesn't it?