debug:swiftui

Diagnose and resolve SwiftUI rendering and state-management issues in iOS/macOS apps.

9|1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin --skill debug-swiftui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug:swiftui
Source: https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin/tree/main/plugins/debug-and-refactor/skills/debug-swiftui
Command: npx skills add https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin --skill debug-swiftui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers through diagnosing and resolving SwiftUI-specific issues, including view update failures, state-management wrapper mismatches (@State/@Binding/@ObservedObject), NavigationStack problems, memory leaks, and preview crashes, with practical tips and structured workflows.

Core Features & Use Cases

  • Structured diagnosis: reproduce and isolate SwiftUI bugs with a repeatable workflow.
  • Actionable fixes: guidance for common patterns like correcting @Published properties, binding propagation, and navigation paths.
  • Debugging toolkit: references to Xcode debugger techniques, Instruments profiling, and LLDB commands for iOS/macOS development.

Quick Start

Load this skill in your Claude environment and start with a failing SwiftUI view. Add Self._printChanges() inside the view body to observe redraws, run the app in Debug, and follow the step-by-step recommendations to verify correct state wrappers, NavigationStack usage, and memory management.

Frequently Asked Questions about debug:swiftui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my SwiftUI view not update when @State or @ObservedObject changes?

SwiftUI views fail to update when state wrappers like @State or @ObservedObject are misconfigured. This skill diagnoses state-management mismatches and binding propagation issues to correct @Published properties and restore reactive view redraws.

How do I debug a NavigationStack misconfiguration in SwiftUI?

Debug NavigationStack misconfigurations in SwiftUI by isolating navigation path bugs through structured workflows. This skill guides developers step-by-step to identify incorrect path bindings and resolve navigation failures in iOS and macOS apps.

What's the best way to find memory leaks in a SwiftUI app?

Find SwiftUI memory leaks by profiling with Instruments and inspecting retain cycles in state objects. This skill provides structured workflows to detect leaks, verify correct memory management, and resolve Combine publisher coordination issues.

How do I use Self._printChanges() to diagnose excessive SwiftUI redraws?

Use Self._printChanges() inside a SwiftUI view body to observe what triggers excessive redraws during Debug runs. This skill leverages Xcode debugging workflows and LLDB commands to isolate and fix rendering issues.

Can I use LLDB and Instruments to troubleshoot SwiftUI preview crashes?

LLDB and Instruments can troubleshoot SwiftUI preview crashes by isolating failing view states and memory issues. This skill applies Xcode debugging techniques to diagnose preview failures and implement actionable fixes.

What causes Combine publisher coordination issues in SwiftUI views?

Combine publisher coordination issues in SwiftUI arise from incorrect subscription handling and state wrapper mismatches. This skill resolves publisher coordination by verifying @Published properties and correcting binding propagation.