Skip to content

Inspect a Compose screen

CLI v3.0.2View Markdown

Outcome: connect the visible problem to the UI tree and relevant source, then verify the corrected screen.

Basic UI inspection uses the connected device service. Compose runtime details require a compatible debuggable app and runtime attachment. Set the project root for source mapping. See the debugger and layout guide.

The Save button on this Compose screen is visible but does not respond.
Use Olef to inspect the screen, actionable elements, and Compose layout.
Check whether it is disabled, covered, or wired incorrectly. Use source
and runtime evidence before changing code, then verify the interaction.
Terminal window
olef ui dump
olef layout snapshot --screenshot

Check labels, bounds, clickability, and the actual target. A visible label may belong to a clickable parent. Prefer a stable resource ID or Compose test tag when available.

Run from the app project directory, or replace . with its Gradle root:

Terminal window
olef --project-root . layout snapshot --compose --semantics --source-map --screenshot

Inspect the returned availability and errors as well as the nodes. Missing Compose data is not evidence that no Compose UI exists. Runtime compatibility and attachment determine which details are available.

For recomposition observations and layout comparisons, inspect the layout commands and runtime commands for the installed version.

Apply the source change, read a fresh screen, and act on the target with an expected result. Check both the visual change and the interaction. A screenshot alone does not prove the button works.