Skip to content

Instantly share code, notes, and snippets.

@bigMOTOR
Created November 15, 2020 10:47
Show Gist options
  • Save bigMOTOR/d77b60339d903143c1d94ab64d2caae9 to your computer and use it in GitHub Desktop.
Save bigMOTOR/d77b60339d903143c1d94ab64d2caae9 to your computer and use it in GitHub Desktop.
My LLDB Hacks
# add to ~/.lldbinit
#
# print JSON https://soffes.blog/debugging-json-data-in-lldb?utm_campaign=iOS%2BDev%2BWeekly&utm_medium=email&utm_source=iOS%2BDev%2BWeekly%2BIssue%2B482
command regex json 's/(.+)/expr let input = %1; print(String(data: try! JSONSerialization.data(withJSONObject: (input is Data ? (try! JSONSerialization.jsonObject(with: input as! Data, options: [])) : input as! Any), options: [.prettyPrinted]), encoding: .utf8)!)/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment