fpc/packages/fcl-base/examples/debugtest.pp
joost 1ce7a88d65 * Fixed the problem that an IPC-Server holds a lock on its pipe so that no
client could connect to it. Now a maximum of one client can connect to it.
 * Debugtest now shows an error immediately when it cant connect to a server
 * Use dbugsrv as default server name to start when no server is found
 * Set SendError when the startup of the debug-server failed
 * When connecting to the debug-server fails, clean up resources and set
   DebugDisabled to false, to avoid an AV on a second try

git-svn-id: trunk@12861 -
2009-03-07 14:06:43 +00:00

40 lines
985 B
ObjectPascal

{
This file is part of the Free Pascal run time library.
Copyright (c) 2003 by the Free Pascal development team
Interactive test for debugserver.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
program testdebug;
uses dbugintf;
Var
S : String;
begin
SendMethodEnter('Program');
If (SendError<>'') then
begin
Writeln('Error : ',SendError);
Exit;
end;
Repeat
Writeln('Enter message to send to debug server (STOP exits): ');
Write('> ');
Readln(S);
SendDebugEx(S,dlError);
If (SendError<>'') then
Writeln('Error : ',SendError);
Until (S='STOP');
SendMethodExit('Program');
SendDebug('Ending');
end.