Maxima Manual. Node: Definitions for Debugging
Debugging
Debugging
34.1: Definitions for Debugging
- Variable: REFCHECK
-
default: [FALSE] - if TRUE causes a message to be printed
each time a bound variable is used for the first time in a
computation.
- Function: REMTRACE
()
-
This function is no longer used with the new TRACE
package.
- Variable: SETCHECK
-
default: [FALSE] - if set to a list of variables (which can
be subscripted) will cause a printout whenever the variables, or
subscripted occurrences of them, are bound (with : or :: or function
argument binding). The printout consists of the variable and the
value it is bound to. SETCHECK may be set to ALL or TRUE thereby
including all variables. Note: No printout is generated when a
SETCHECKed variable is set to itself, e.g. X:'X.
- Variable: SETCHECKBREAK
-
default: [FALSE] - if set to TRUE will cause a
(MACSYMA-BREAK) to occur whenever the variables on the SETCHECK list
are bound. The break occurs before the binding is done. At this
point, SETVAL holds the value to which the variable is about to be
set. Hence, one may change this value by resetting SETVAL.
- Variable: SETVAL
-
- holds the value to which a variable is about to be set when
a SETCHECKBREAK occurs. Hence, one may change this value by resetting
SETVAL. (See SETCHECKBREAK).
- Function: TIMER
(F)
-
will put a timer-wrapper on the function F, within the TRACE
package, i.e. it will print out the time spent in computing F.
- Variable: TIMER_DEVALUE
-
default: [FALSE] - when set to TRUE then the time
charged against a function is the time spent dynamically inside the
function devalued by the time spent inside other TIMED functions.
- Function: TIMER_INFO
(F)
-
will print the information on timing which is stored
also as GET('F,'CALLS); GET('F,'RUNTIME); and GET('F,'GCTIME); . This
is a TRACE package function.
- Function: TRACE
(name1, name2, ...)
-
gives a trace printout whenever the
functions mentioned are called. TRACE() prints a list of the
functions currently under TRACE. On MC see MACDOC;TRACE USAGE for
more information. Also, DEMO("trace.dem"); . To remove tracing,
see UNTRACE.
- Function: TRACE_OPTIONS
(F,option1,option2,...)
-
gives the function F the
options indicated. An option is either a keyword or an expression.
The possible Keywords are:
Keyword Meaning of return value
----------------------------------------
NOPRINT If TRUE do no printing.
BREAK If TRUE give a breakpoint.
LISP_PRINT If TRUE use lisp printing.
INFO Extra info to print.
ERRORCATCH If TRUE errors are caught.
A keyword means that the option is in effect. Using a keyword as an
expression, e.g. NOPRINT(predicate_function) means to apply the
predicate_function (which is user-defined) to some arguments to
determine if the option is in effect. The argument list to this
predicate_function is always [LEVEL, DIRECTION, FUNCTION, ITEM] where
LEVEL is the recursion level for the function. DIRECTION is either
ENTER or EXIT. FUNCTION is the name of the function. ITEM is either
the argument list or the return value. On MC see
DEMO("trace.dem"); for more details.
- Function: UNTRACE
(name1, ...)
-
removes tracing invoked by the TRACE function.
UNTRACE() removes tracing from all functions.
Debugging
Debugging