Inspect the live view hierarchy of a running iOS or macOS app in a browser to debug layout and sizing issues without installing extra tools.
View SwiftUI view state, modifiers, and struct values alongside UIKit layer geometry in one interactive interface.
Automate UI inspection queries from an AI coding assistant using the built-in MCP server mode.
Only included in debug builds, not added to production app bundles.
Treescope is a debugging tool for Apple platform developers that lets you inspect the live visual structure of a running iOS, macOS, or tvOS app directly in a web browser. When you are building an app and want to understand exactly how the interface is laid out, which views are nested inside which, and what properties each one has, Treescope gives you a browsable interactive view of all of that information without needing to install any extra app on your machine. The way it works is that you add a small library to your app's debug build with one line of code. When the app runs, that library starts a tiny local web server. You then open a browser and go to a localhost address, and you see the full visual hierarchy of your running app. You can browse the tree of views, see their sizes and positions, take snapshots of individual elements, and view everything in an exploded 3D diagram that shows how the layers stack on top of each other. Some properties can be edited live without restarting the app. One of its distinguishing features is support for SwiftUI, which is Apple's newer way of building interfaces. Most similar tools only work with the older UIKit and AppKit systems. Treescope inspects SwiftUI using public reflection techniques rather than private or restricted system APIs, so it shows you the declared view structure, state values, and modifiers for your SwiftUI views alongside the traditional layer geometry. Because the viewer runs in a browser, there is nothing extra to install. Anyone on macOS, Windows, or Linux can open the URL. There is also a command-line interface for scripting and automation, and an MCP server mode for AI coding assistants that want to query the view hierarchy programmatically. The library adds no production dependencies to your app since it is only included in debug builds. It uses only Apple's built-in networking framework and does not require any third-party packages. The project is MIT licensed.
← everettjf on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.