'LLDB Breakpoint on all methods in Swift class
How can I use LLDB to set a breakpoint on all methods / computed properties in a Swift class?
My use case is to debug the flow of executing a particular type’s methods but we could also use the command for general debugging/learning.
I found the syntax to create an LLDB breakpoint for all methods in an Objective-C class here, but this doesn't seem to work for Swift classes/structs.
Solution 1:[1]
The following syntax works for creating a Regex breakpoint for every symbol (properties and methods) in a Swift type, including structs and classes.
Assuming a type called Circle:
(lldb) break set -r "\.Circle\..*"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Pranav Kasetti |
