Swift.org Sep 28, 2023

What's New in Swift 5.9 Debugging

Article Summary

Adrian Prantl, Augusto Noronha, and Dave Lee from Apple's Debugger Compiler Integration team just made debugging Swift apps significantly faster. If you're still using the old `p` and `po` commands the same way, you're leaving performance on the table.

Swift 5.9 shipped with three major debugging improvements that change how developers inspect variables and troubleshoot code in LLDB. The updates focus on speed, generic type support, and more accurate variable scoping during debug sessions.

Key Takeaways

Critical Insight

Swift 5.9's debugging improvements make variable inspection faster and more accurate by replacing heavyweight expression evaluation with lightweight alternatives and adding generic type support.

The article reveals a simple ~/.lldbinit configuration that lets you customize the new behavior if you actually need those persistent result variables.

Recent from Swift.org

Related Articles