Skip to main content

TraceStart · TraceStop · TraceStatus

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Record a session as a trace: start, then every call on this device is a step — before and after, the point an action touched, a failure's error — and after each the screen, with the map's elements drawn over it; stop with a path saves a zip in Vibium's record format, which player.vibium.dev opens. These call app_trace.

TraceStart​

func (d *Device) TraceStart(ctx context.Context, opts *TraceOptions) (*Trace, error)

TraceStart records every call on this device from now until TraceStop as a step: before and after, the point an action touched, a failure's error, and after each the screen with the map's elements drawn over it. Text typed into a field is not recorded, only its length. One trace per device, and ending the session discards it.

TraceStop​

func (d *Device) TraceStop(ctx context.Context, path string) (*Trace, error)

TraceStop ends the trace and saves it to path as a zip in Vibium's record format, which player.vibium.dev opens. A relative path is this process's: mobium pipe resolves it before the daemon sees it.

TraceStatus​

func (d *Device) TraceStatus(ctx context.Context) (*Trace, error)

TraceStatus asks whether a trace is running on this device, and if so how many calls it holds so far.

Examples​

Start tracing the session​

if _, err := dev.TraceStart(ctx, &mobium.TraceOptions{Name: "sign in"}); err != nil {
return err
}

Stop, and save the trace​

saved, err := dev.TraceStop(ctx, "sign-in.zip")
if err != nil {
return err
}
fmt.Println(saved.Calls, saved.Path)