{*******************************************************}
{                                                       }
{       Pascal Script Source File                       }
{       Run by RemObjects Pascal Script in CnWizards    }
{                                                       }
{       Generated by CnPack IDE Wizards                 }
{                                                       }
{*******************************************************}

program CnDebugDemo;

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  CnDebug;

function Calc(N: Integer): Integer;
begin
  CnDebugger.LogEnter('Calc', '');
  if N > 0 then
    Result := N * Calc(N - 1)
  else
    Result := 1;
  CnDebugger.LogInteger(Result, 'Result');
  CnDebugger.LogLeave('Calc', '');
end;

var
  i: Integer;

begin
  CnDebugger.StartDebugViewer;
  
  CnDebugger.LogMsg('CnDebugDemo');
  Calc(6);

  CnDebugger.StartTimeMark(1, 'loop');
  for i := 1 to 10000 do
    ;
  CnDebugger.StopTimeMark(1, 'loop');

  CnDebugger.LogObject(Application.MainForm);
  
  CnDebugger.EvaluateObject(Application.MainForm);
end.
 
