Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Print stack trace just with classes names and method names
- private func printDebugStackTrace(fname: String? = nil) {
- let stackSymbols = Thread.callStackSymbols
- stackSymbols.forEach {
- let components = $0.replacingOccurrences(
- of: "[A-Z]{1,1}\\d{1,2}|\\s+|yy+|SSS+",
- with: " ",
- options: .regularExpression,
- range: nil).components(separatedBy: " ")
- if components[3] == "$", components.count > 5, components[5] != "UWImage" {
- debugPrint("Class \(components[5]).\(components[6])".trim())
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement