Observable Object Debugger
Watch for ObservableObject
in real time. (This is the Alpha version)
Quick Start
- Add package to you project.
let package = Package(
dependencies: [
.package(url: "https://github.com/YusukeHosonuma/ObservableObjectDebugger.git", branch: "main"),
],
targets: [
.target(name: "" , dependencies: [
"ObservableObjectDebugger",
]),
]
)
- Add
debugObserve
modifier to any View.
import ObservableObjectDebugger // ✅ Add import
struct ContentView: View {
@StateObject private var viewModel: ContentViewModel = .init()
var body: some View {
Text("Hello")
.debugObserve(viewModel) // ✅ You can specify any `ObservableObject`.
}
}
- Build and launch the Viewer app or reference to folder
/tmp/ObservableObjectDebugger
(with VSCode and others).
Requirements
- iOS 14+ (Simulator only)
- macOS 12+ (Viewer app)
Author
Yusuke Hosonuma / @tobi462