-
Notifications
You must be signed in to change notification settings - Fork 0
Debugger (LLDB)
Ken Harris edited this page Oct 25, 2020
·
1 revision
The debugger doesn't use description
to print values -- which kind of makes sense, since not every value is guaranteed to have that property.
Whatever internal LLVM function it does use, though, is notoriously unreliable. (For a few years, it printed file URLs as "ile".) Be very careful trusting anything it prints that isn't a string or number. For example, an Optional that prints as nil
might not be Optional<T>.none
:
> import Foundation
> URL(string: "\n")
$R0: URL? = nil
> URL(string: "http://")
$R1: URL? = nil
> $R0 == nil
$R2: Bool = true
> $R1 == nil
$R3: Bool = false