Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

trace [-where] string

trace is NOT undoable, NOT queryable, and NOT editable.

The trace command displays its string argument directly to standard output. It is intended to provide a mechanism for debugging Mel scripts.

Return value

None

Related

print

Flags

where
Long name (short name) Argument types Properties
-where(-w) create
If present the file and line number is prefixed to the output indicating where the trace call originates.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// Set up globals for example
//
global string $myGlobalVar = "glob";
global proc suspiciousProc_1() {
    print "this proc cannot be trusted\n";
}

// Print information as the script runs
//
trace -where "start of script\n";
suspiciousProc_1;
trace -where ("value of $myGlobalVar " + $myGlobalVar + "\n");