Where can I learn more about debugging swift code with lldb.
Further, if I'm not wrong, I understand lldb can be used to interact with "live" applications? Like Finder, or Music.app, etc.?
I know there are some WWDC videos, but to be quite honest they did not seem very useful. I found them to be too specific.
This talk was awesome: WWDC 2018 Session 412 Advanced Debugging with Xcode and LLDB. Sadly, it’s no longer available from Apple [1].
Further, if I'm not wrong, I understand lldb can be used to interact
with "live" applications? Like Finder, or Music.app, etc.?
Not by default:
% lldb
(lldb) process attach -n Finder
error: attach failed: attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)
(lldb)
In some cases you can get around this by disabling SIP.
WARNING Don’t disable SIP on machines you care about. I only disable SIP on ‘victim’ machines, typically VMs that I wipe when I’m done.