PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
DebugLevel=["]Command1,Command2,...["] |
This #option command allows you to modify
the output generated by /debug and
#debug.
PPWIZARD generates quite a bit of debug information when debug is
on, this is fine for small source files but could easily become hundreds
of thousands of lines in more complex situations. If you are debugging a
specific issue you may want to turn off debugging of unrelated
events (this could also speed things up). Of course being more selective
about placement of #debug commands is another very
good option (why debug the whole process?).
Note that you can turn off almost all debugging output, doing so could
make it very difficult to determine what is going on as statements such
as #AutoTag could transform lines in what appears to be
a magical manner.
It's up to you to determine what level you require.
You may specify any numbers of commands, each separated by a comma. A
command may begin with a '-' (to turn off) or '+'
(turn on - default) the debug facility. By default all debug output
is generated.
Valid debug facilities are:
- ALL
This represents all debug options.
This less "USER?" is the default situation
when PPWIZARD starts.
- AFTERREPLACE
All display of lines after some sort of replacement such as
that by #AsIs commands or your macros.
- ASIS
Debug the #AsIs command.
- AUTOTAG
Debug the #AutoTag command.
- CONDITIONAL
#if, #endif output etc.
- DEFINING
Output related to defining variables/macros.
- EVALUATE
This debugs PPWIZARD functions that can be used in
#evaluate or #if commands
etc.
- FOUNDVAR
Output to do with individual processing of your macros.
- FOUNDVARPARMS
Output to do with individual processing of your macro's parameters.
- FOUNDSTDVAR
Output to do with processing of individual Standard Macros.
- IMPORT
Debug any IMPORT statements PPWIZARD performs. This will
also automatically adjust "MACROVALORDEF".
- INTERPRET
Debug any INTERPRET statements PPWIZARD performs. PPWIZARD
does not trace all but will show ones from #if
and #evaluate commands.
- MACROVALORDEF
PPWIZARD allows some things to be defined via a macro, there
is usually a default value. This debugs these situations.
- OPTIONS
Any output related to #option command.
- OPSYS
Debug commands executed by operating system.
- QUOTING
Debug the calls that grab
quoted values.
- REXXVAR
Debug the #RexxVar command.
- REXXTRACE
Turn on rexx's inbuilt tracing for the execution of any
rexx code that gets executed by commands such as
#if, #evaluate and
#import. This can be quite extensive so you
might want to turn it off or lower its level (see below) for
general debugging. The format of the output is described below.
The PPWIZARD macro "REXXTRACE" can be used
to control the level of rexx debugging. The default level
is "INTERMEDIATES" with "RESULTS" generating
less output while still being useful. The value you specified
is used in the rexx "TRACE ???" command.
Preceeding the value with '?' (as in "?Results") turns on
interactive trace. You can execute any rexx
commands to display or modify values.
- SPELLING
Show all spelling related output?
- USER1 & USER2
Nothing in ppwizard itself makes use of these debug states,
you can make use these for your own purposes.
You can use these two flags either as a number
(ranging from 0 to 3) for as 2 options (on or off).
To test the current state you need to call
IsDebugOn().
The value of USER bit one is 1 and USER bit two is 2.
Note that you could define your own debug "flags" using
"/define depending on the type of debug.
The disadvantage on using these bits is the mimimum extra
debug output is the contents of each line as it is processed.
This debug output is supplied by the rexx interpreter.
The output from Regina is much inferior to that of OS/2 however it's still
very useful.
For an alternative way of debugging rexx code have a look at the
/$Trace switch.
The following can be used as a guide to understanding the output:
- Every clause traced will be displayed with automatic formatting
(indentation) according to its logical depth of nesting and so
on, and the results (if requested) are indented an extra two
spaces and are enclosed in double quotation marks so that leading
and trailing blanks are apparent.
- All lines displayed during tracing have a three-character prefix
to identify the type of data being traced. The prefixes and their
definitions are the following:
- *-*
Identifies the source of a single clause, that is,
the data actually in the program.
- +++
Identifies a trace message. This can be the
nonzero return code from a command, the prompt
message when interactive debug is entered, an
indication of a syntax error when in interactive
debug, or the traceback clauses after a syntax
error in the program.
- >>>
Identifies the result of an expression (for TRACE R) or
the value assigned to a variable during parsing, or the value
returned from a subroutine call.
- >.>
Identifies the value assigned to a placeholder
during parsing.
- >C>
The data traced is the name of a compound
variable, traced after substitution and before
use, provided that the name had the value of a
variable substituted into it.
- >F>
The data traced is the result of a function call.
- >L>
The data traced is a literal (string or constant symbol).
- >O>
The data traced is the result of an operation on two terms.
- >P>
The data traced is the result of a prefix operation.
- >V>
The data traced is the contents of a variable.
Lets turn off all optional debugging except
CONDITIONAL and OPTIONS:
#option DebugLevel=~-ALL,+CONDITIONAL,OPTIONS~
PPWIZARD Manual

Thursday January 17 2002 at 6:27pm