v/vo vs po/p in lldb

Development, General, iOS, Xcode

v is the alias for “frame variable”, Apple added that back in Xcode with v10.2+

Most of the times developers want to use v instead of po/p in lldb as it’s faster and more reliable way to get your info.

Also there is a subtle issue when using po/p in Swift, they retain values for the entire debug session by creating a persistent variable in lldb, that means their resources are not freed.

Definitely use v/vo especially when debugging memory issues and retain cycles in Xcode 10.2+

Unfortunately v/vo work for stored properties but computed properties and lazy properties require p/po.

Tags :

debug, iOS, xcode

Share This :