sysTrace

C Styled Script
Reference Manual

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using The CSS Executive
Language
Directives
System Library
   sysCommand
   sysDate
   sysDirectory
   sysElapsed
   sysEnvVar
   sysLoadScript
   sysLoadLibrary
   sysLog
   sysLogFile
   sysLogLevel
   sysProfile
   sysPrompt
   sysSleep
   sysShow
   sysStartDate
   sysStartTime
   sysSystemProfile
   sysTime
   sysTrace
   sysUserProfile
String Library
Regular Expression Lib.
File Library
Database Library
C API
C++ API
CSS Links
  
sysTrace(
  [const state])  // on = true, off = false

Query trace state or turn tracing on/off by an arg of true/false.

Trace will show each P-Code instruction together with the 2 top stack elements while executing. Currently there is no source code tracing facility (may however come in a future release).

If a logfile was opened, the trace information will be written to it.

Returns current trace state.

Example:

trace(true); // turn tracing on

The trace output may look somewhat as:

test.css: var main()
 
address opcode parameter       tos             tos-1
------- ------ --------------- --------------- ---------------
     19 push   x               <stack bottom>
     20 incv                   x               <stack bottom>
     21 jmp    7               <stack bottom>
      7 push   x               <stack bottom>
      8 load                   x               <stack bottom>
      9 push   5               3               <stack bottom>
     10 lss                    5               3
     11 jf     22              1               <stack bottom>
      .  .      .              .               .
 Copyright © IBK LandquartLast revised by Peter Koch, 24.02.00<< Back  Top  Next >>