xHarbour Reference Documentation > Command Reference xHarbour Developers Network  

SET TRACE

Toggles output of function TraceLog().

Syntax

SET TRACE ON | off | (<lOnOff>)

Arguments

ON | off | (<lOnOff>)
The option toggles whether or not output of function TraceLog() is directed into the trace log file. The default is ON, or .T. (true). When set to OFF or .F. (false), function TraceLog() produces no output.

Description

The SET TRACE command is part of xHarbour's tracing system which allows for logging function, method or procedure calls in an arbitrary way. The default file receiving entries from the TraceLog() function is named Trace.log. It can be changed with Set(_SET_TRACEFILE).

Info

See also:Set(), TraceLog()
Category: Environment commands , SET commands , xHarbour extensions
Source:rtl\set.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example produces a trace.log file with an log entry
// for PROCEDURE Test()

   PROCEDURE Main

      SET TRACE OFF
      TraceLog()

      ? "Hello World"

      SET TRACE ON
      Test( "Hi there" )

   RETURN


   PROCEDURE Test( cMsg )

      Tracelog( cMsg )
      ? cMsg

   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe