From 65951c8a1aff10e6b893f53a62db2621014197eb Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 2 Apr 2013 11:58:26 +0100 Subject: core: Debug output is now sent to the Debug Server instead of console output. This makes testing a bit easier on all platforms. --- src/corelib/fpg_main.pas | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index 89c5da1d..44ab6a82 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -457,6 +457,9 @@ uses {$ifdef AGGCanvas} Agg2D, {$endif} +{$IFDEF DEBUG} + dbugintf, +{$ENDIF} fpg_imgfmt_bmp, fpg_stdimages, fpg_translations, @@ -832,14 +835,14 @@ begin FClassName := AClassName; FMethodName := AMethodName; {$IFDEF DEBUG} - Writeln(Format('%s>> %s.%s', [spacing, FClassName, FMethodName])); + SendDebug(Format('%s>> %s.%s', [spacing, FClassName, FMethodName])); {$ENDIF} end; destructor TPrintCallTrace.Destroy; begin {$IFDEF DEBUG} - Writeln(Format('%s<< %s.%s', [spacing, FClassName, FMethodName])); + SendDebug(Format('%s<< %s.%s', [spacing, FClassName, FMethodName])); {$ENDIF} dec(iCallTrace); inherited Destroy; @@ -1167,7 +1170,7 @@ begin end; {$IFDEF DEBUG} - Writeln('GetNamedFontDesc error: "' + afontid + '" is missing. Default is used.'); + SendDebug('GetNamedFontDesc error: "' + afontid + '" is missing. Default is used.'); {$ENDIF} Result := FPG_DEFAULT_FONT_DESC; end; @@ -1328,7 +1331,7 @@ begin begin fr.Free; {$IFDEF DEBUG} - writeln('fpGFX: Error opening font.'); + SendDebug('fpGFX: Error opening font.'); {$ENDIF} end; end; @@ -1651,7 +1654,7 @@ end; procedure TfpgApplication.HideHint; begin {$IFDEF DEBUG} - writeln('HideHint'); + SendDebug('HideHint'); {$ENDIF} FHintTimer.Enabled := False; if Assigned(FHintWindow) and TfpgHintWindow(FHintWindow).Visible then @@ -2439,7 +2442,7 @@ begin {$Note This occurs every now and again with TfpgMemo and CaretInvert painting! } // Investigate this. {$IFDEF DEBUG} - writeln('TfpgCaret.InvertCaret cause an exception'); + SendDebug('TfpgCaret.InvertCaret cause an exception'); {$ENDIF} end; end; -- cgit v1.2.3-70-g09d2