help tr
-------------------------------------------------------------------------------

Title

tr -- Prefix command to trace program execution

Syntax

tr [#] [, options ] : command

options description ---------------------------------------------------------------------- [no]more do not/do pause for --more-- messages [no]expand do not/do show macro expansion [no]sep do not/do display separator lines for subroutines [no]indent do not/do indent lines according to nesting level [no]number do not/do indicate nesting level hilite(pattern) highlight pattern in the trace output nohilite turn highlighting off ----------------------------------------------------------------------

Description

tr is a prefix command (see [U] 11.1.10 Prefix commands) to trace the execution of a program (see [P] trace). In essence, tr is a shorthand for typing

. set trace on . command . set trace off

Specify # to determine the tracedepth, the number of levels in tracing nested programs. The default is 32000 or as set by set tracedepth.

Options

more causes Stata to wait until you press a key before continuing when a --more-- message is displayed. nomore tells Stata not to pause or display the --more-- message. The default is as set by set more.

expand shows the code lines both before and after macro expansion. noexpand suppresses the expanded code lines. The default is to show the expanded lines or as set by set traceexpand.

sep displays horizontal separator lines between subroutines. nosep suppresses the separator lines. The default is to display the separator lines or as set by set tracesep.

indent indents the code lines according to the nesting level. noindent suppresses indenting the lines. The default is to indent the lines or as set by set traceindent.

number displays the nesting level at the beginning of each line. nonumber suppresses displaying the nesting level. The default is not to show the nesting level or as set by set tracenumber.

hilite(pattern) causes the specified pattern to be highlighted in the trace output. nohilite suppresses the highlighting requested by set tracehilite.

Examples

. tr: sysuse auto

. tr 1: sysuse auto

. tr 1, hilite("local"): sysuse auto

Author

Ben Jann, ETH Zurich, jannb@ethz.ch

Thanks for citing this software as follows:

Jann, B. (2009). tr: Stata module providing prefix command to trace program execution. Available from http://ideas.repec.org/c/boc/bocode/s457008.html.

Also see