Skip to content

Instantly share code, notes, and snippets.

@dterekhov
Last active November 7, 2025 21:24
Show Gist options
  • Select an option

  • Save dterekhov/3e2acbc779efb7791a4b3e996524fd87 to your computer and use it in GitHub Desktop.

Select an option

Save dterekhov/3e2acbc779efb7791a4b3e996524fd87 to your computer and use it in GitHub Desktop.
Access property wrapper values in LLDB console #debug #xcode

Console Debugging Tip for Swift Developers

Sometimes the debugger cannot display a value inside a property wrapper (e.g., @State, @Published, etc.).
You can directly access the underlying storage variable using the underscore (_) prefix in LLDB.

Example

(lldb) po self._viewModel.startPointAngle/*
 Console debugging tip for Swift developers

 Sometimes the debugger cannot display a value inside a property wrapper (e.g., @State, @Published, etc.).
 You can directly access the underlying storage variable using the underscore (_) prefix in LLDB.

 Example:
 (lldb) po self._viewModel.startPointAngle

 This command prints the actual stored value, even when the wrapper obscures it.
 */
@dterekhov
Copy link
Author

97715252-2D66-4229-8781-404EF0606280_1_101_o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment