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(self, usecolor)[source]

Specify whether or not the tracer output should be colored.

start(self, filename)[source]

Starts tracing a file.

stop(self, filename)[source]

Stops tracing a file.

trace(self, frame, event, arg)[source]

Implements a line tracing function.

valid_events = frozenset({'call', 'line'})
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.