Created
November 15, 2020 10:47
-
-
Save bigMOTOR/d77b60339d903143c1d94ab64d2caae9 to your computer and use it in GitHub Desktop.
My LLDB Hacks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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