[pascal]unit Unit1;
interface
type
TDebugProc = procedure(Text: string) of object;

TForm1 = class...
procedure RealDebugProc(Text: string);
end;
implementation
uses Unit2;
begin
Form2.DebugProc:= @Form1.RealDebugProc;
end.

///////////////////////////////////////
unit Unit2;
interface
uses Unit1;
type
TForm2 = class...
DebugProc: TDebugProc;
procedure DoSomething;
end;
implementation

procedure TForm2.DoSomething;
begin
if Assigned(@DebugProc) then
DebugProc('Output debug string');
end;
[/pascal]