LazDebuggerFPDServer: Send console-output to the terminal window

git-svn-id: trunk@49265 -
This commit is contained in:
joost 2015-06-04 18:08:31 +00:00
parent 5960d41722
commit defb929545

View File

@ -264,6 +264,7 @@ type
procedure DoHandleCreateProcessEvent(AnEvent: TJSONObject); procedure DoHandleCreateProcessEvent(AnEvent: TJSONObject);
procedure DoHandleExitProcessEvent(AnEvent: TJSONObject); procedure DoHandleExitProcessEvent(AnEvent: TJSONObject);
procedure DoHandleBreakpointEvent(AnEvent: TJSONObject); procedure DoHandleBreakpointEvent(AnEvent: TJSONObject);
procedure DoHandleConsoleOutputEvent(AnEvent: TJSONObject);
public public
constructor Create(const AExternalDebugger: String); override; constructor Create(const AExternalDebugger: String); override;
destructor Destroy; override; destructor Destroy; override;
@ -1034,11 +1035,20 @@ begin
QueueCommand(TFPDSendDoCurrentCommand.create); QueueCommand(TFPDSendDoCurrentCommand.create);
end; end;
procedure TFPDServerDebugger.DoHandleConsoleOutputEvent(AnEvent: TJSONObject);
var
AMessage: string;
begin
Message:=AnEvent.Get('message','');
OnConsoleOutput(Self, AMessage);
end;
procedure TFPDServerDebugger.HandleNotification(ANotification: TJSONObject); procedure TFPDServerDebugger.HandleNotification(ANotification: TJSONObject);
var var
NotificationType: string; NotificationType: string;
UID: integer; UID: integer;
SendCommand: TFPDSendCommand; SendCommand: TFPDSendCommand;
Message: string;
begin begin
// Ignore notifications from other connections // Ignore notifications from other connections
if ANotification.get('connIdentifier',-1)=FSocketThread.ConnectionIdentifier then if ANotification.get('connIdentifier',-1)=FSocketThread.ConnectionIdentifier then
@ -1110,7 +1120,8 @@ begin
case EventName of case EventName of
'CreateProcess' : DoHandleCreateProcessEvent(ANotification); 'CreateProcess' : DoHandleCreateProcessEvent(ANotification);
'ExitProcess' : DoHandleExitProcessEvent(ANotification); 'ExitProcess' : DoHandleExitProcessEvent(ANotification);
'BreakPoint' : DoHandleBreakPointEvent(ANotification) 'BreakPoint' : DoHandleBreakPointEvent(ANotification);
'ConsoleOutput' : DoHandleConsoleOutputEvent(ANotification);
else else
debugln('Received unknown event: '+EventName); debugln('Received unknown event: '+EventName);
end; end;