Loupe provides runtime debugging tools for SwiftUI applications. Visualize render cycles, inspect layout bounds, track positions, and overlay precision grids—all with minimal setup.
https://github.com/Aeastr/Loupe.git
Add via Xcode: File → Add Packages and paste the URL above.
See when views re-render or re-compute:
import Loupe
Text("Count: \(count)")
.debugRender() // Shows re-renders with colored backgrounds
.debugCompute() // Shows re-computations with red flashesLearn more about render debugging →
Display bounds, safe area insets, and dimensions:
ZStack {
Color.blue
.overlay {
VisualLayoutGuide("Content Area")
}
}Enable dragging and persistence:
VisualLayoutGuide("Debug View")
.visualLayoutGuideInteractions(dragEnabled: true, persistenceEnabled: true)Learn more about layout guides →
Monitor coordinates with draggable overlays:
DraggablePositionView("Tracker")
.draggablePositionViewInteractions(dragEnabled: true)Learn more about position tracking →
Add precision alignment grids:
VisualGridGuide("8pt Grid", squareSize: 8, fit: .exact)
.ignoresSafeArea()Learn more about grid guides →
Render Debugging
.debugRender()- Visualize re-renders.debugCompute()- Visualize re-computationsRenderCheck- Batch debugging wrapper
Layout Inspection
VisualLayoutGuide- Bounds, insets, and dimensionsDraggablePositionView- Coordinate trackingVisualGridGuide- Alignment grids
Container Shapes (iOS 26+)
VisualCornerInsetGuide- ConcentricRectangle visualization
All debugging tools are conditionally compiled with #if DEBUG. They are automatically excluded from release builds—no manual cleanup required.
- Wiki Home - Complete documentation
- Render Debugging - debugRender(), debugCompute(), RenderCheck
- Visual Layout Guide - Bounds and inset inspection
- Draggable Position View - Position tracking
- Visual Grid Guide - Grid overlays
- API Reference - Complete API documentation
MIT License. See LICENSE for details.
by Aether