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.

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)[source]

Main function for tracer command-line interface.