Skip to main content

app_trace

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. Omit the action to ask whether one is running. Text typed into a field is not recorded, only its length. On a real phone the screenshots are its owner's screen; screenshots false keeps none. One trace per device; ending the session discards it.

Changes the device, the app or the session: readOnlyHint is false.

Arguments​

NameTypeRequiredWhat it is
actionstring: start, stopstart or stop. Omit to ask whether a trace is running.
devicestringDevice serial to target, e.g. "emulator-5554". Omit when only one device is running.
driverstring: uiautomator2, uiautomator, wdaDriver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones).
mapsbooleanOn start: draw the map's elements over each screenshot. Default true.
namestringOn start: the trace's title, as the viewers show it.
pathstringOn stop: where to save the trace, a .zip on this machine.
return_databooleanOn stop without a path: return the zip, base64, instead of saving it — for a daemon on another machine; the CLI and pipe ask for it and save it where the caller said.
screenshotsbooleanOn start: keep the screen after each call. Default true.

Examples​

Each is the arguments of a tools/call request; the first is shown whole.

Start tracing the session​

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_trace",
"arguments": {
"action": "start",
"name": "sign in"
}
}
}

Stop, and save the trace​

{
"action": "stop",
"path": "sign-in.zip"
}