Uploaded image for project: 'Swift'
  1. Swift
  2. SR-12444

Xcode Debugger and lldb fail to display Foundation Types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: LLDB for Swift
    • Labels:
      None
    • Environment:

      Xcode Version 11.3.1 (11C505)

      I ran this in the simulator but this also occurs on the device. I believe this bug has existed for several years.

      Description

      The Xcode debugger fails to display some Foundation Types correctly

      in the Variables Pane. lldb also fails to print these same types

      correctly using 'frame v' and 'print' however it does correctly

      print them using 'po'.

       

      This is easily seen using the attached project. Set a breakpoint

      on the print statement in the ViewController class and debug

      the app. Once the breakpoint is hit some Foundation Types will

      display correctly in the Variables Pane and will print correctly

      using frame v and p. These include Data, NotificationName,

      Notification and builtin types like Int, and Float. ClosedRange

      also works as expected.

       

      A number of other types fail to display correctly in the Varibles

      Pane and also fail to print correctly with frame v and print. They do

      print correctly with po. These include Date, TimeZone, URL, Calendar

      DateComponents, IndexPath. I haven't tested every type so others

      probably fail as well.

       

      Optionals of these failing types always display as nil in the

      Variables Pane and in lldb frame v even when they aren't nil.

       

      All these types work as expected in a playground and the descriptions

      displayed in a playground for these types is what I expect to see

      in Xcode and in lldb.

       

      I've attached the project, the playground, and a couple screenshots

      of what this looks like in Xcode.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              phoneyDev BrianS
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: