After upgrading from Xcode 14.3 to Xcode 15.2, I am observing unexpected behaviour in Xcode when printing string variables to the console.
Specifically, blank lines do not show up (they previously did, as expected, with Xcode 14.3).
Steps to reproduce:
-
Put this multiline (Swift) string literal in some Swift file (two lines with one blank line in between)
let test = """ line1 line3 """
-
let Xcode hit a breakpoint in the file with the string
-
print the string value to Xcode console:
(lldb) po test "line1\n\nline3"
-
print the same string, cast to
NSString
, to Xcode console:(lldb) po test as NSString line1 line3
Observed:
- The blank line is missing in the "po test as NSString" output
Expected:
- There should be a blank line between line1 and line3
I'm running macOS 13.6 (22G120) and Xcode 15.2 (15C500b)