Post

Replies

Boosts

Views

Activity

Xcode console swallows blank lines when po'ing string variables
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 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)
1
0
314
Feb ’24
Xcode console swallows blank lines when printing string variables
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)
2
0
630
Feb ’24