XYDebugView is a lightweight UIKit hierarchy debugger with:
2Dframe inspection3Dexploded layer inspection- layer focus and coloring controls
- index tree browsing for the current window or a specific view
The demo app is a pure-code sample generated from Demo/project.yml and integrated through a local development pod.
| Home | 3D Card | 3D Card Controls |
|---|---|---|
![]() |
![]() |
![]() |
XYDebugView is available through CocoaPods.
pod 'XYDebugView', '~> 2.0.0'#import <XYDebugView/XYDebugViewManager.h>// Debug the current key window in 2D.
[[XYDebugViewManager sharedInstance] showDebug];
// Debug the current key window in a specific style.
[[XYDebugViewManager sharedInstance] showDebugStyle:XYDebugStyle3D];
// Debug a specific view in 2D / 3D / Index mode.
[[XYDebugViewManager sharedInstance] showDebugView:view withDebugStyle:XYDebugStyle3D];[[XYDebugViewManager sharedInstance] closeDebug];The 3D inspector currently supports:
Layer Coloring:Off,Outline,FilledFocus Range: how many neighboring layers remain visible while focusedContext Fade: minimum opacity for non-focused layersDepth Spread: z-spacing between cloned layersCamera: scene perspective strength
The focus ruler stays pinned to the right edge and expands on touch-down, then resets back to All Layers shortly after touch-up.
brew install xcodegen
./scripts/bootstrap_demo.sh
open Demo/XYDebugViewDemo.xcworkspaceThere is also a double-click launcher at GenerateDemo.command.
./scripts/capture_demo_screenshots.shThat script:
- regenerates the demo project
- builds the app for the simulator
- launches capture scenarios
- writes screenshots into
docs/images
- The demo app adopts the modern
UIScenelifecycle. - The demo is intentionally pure-code so the repository only keeps pod logic, demo logic, and generation config.
XcodeYang, xcodeyang@gmail.com
XYDebugView is available under the MIT license. See LICENSE.


