Tracer (xonsh.tracer)

Implements a xonsh tracer.

class xonsh.tracer.TracerType[source]

Represents a xonsh tracer object, which keeps track of all tracing state. This is a singleton.

color_output(usecolor)[source]

Specify whether or not the tracer output should be colored.

start(filename)[source]

Starts tracing a file.

stop(filename)[source]

Stops tracing a file.

trace(frame, event, arg)[source]

Implements a line tracing function.

valid_events = frozenset({'line', 'call'})
xonsh.tracer.tracer_format_line(fname, lineno, line, color=True, lexer=None, formatter=None)[source]

Formats a trace line suitable for printing.

xonsh.tracer.tracermain(args=None, stdin=None, stdout=None, stderr=None, spec=None)[source]

Main function for tracer command-line interface.