-
swiftc
invokes sub-commands, so you shouldn't runlldb
on theswiftc
command itself. You can add the-###
option toswiftc
to see the underlying sub-commands. Pick the correct sub-command, then runlldb -- <command>
. -
Usually, we want the first command, so run something like:
lldb -- `swiftc file.swift | head -n 1`
-
Use
--one-line r
to run immediately after loading, without having to set breakopints - great for debugging crashes
OlderNewer