Debugger unable to show value for Date but can for NSDate

Issue noticed when upgrading to Xcode 12.

Whilst debugging Swift code I noticed that variables of type Date show no value in the debuggers variable view.
Code Block
notificationDate (Date)

If I put a cast in my Swift code to NSDate:
Code Block
let nsNotificationDate = notificationDate as NSDate
Then it shows a value in the debugger variables view:
Code Block
notificationDate = (NSDate) 2020-09-17 16:58:40 UTC


If I 'po' the Date variable in the debug console I can see its value.
Code Block
Printing description of notificationDate:
▿ 2020-09-17 16:58:40 +0000
  - timeIntervalSinceReferenceDate : 622054720.023765

If I 'po' the NSDate cast version I can also see its value.
Code Block
Printing description of nsNotificationDate:
2020-09-17 16:58:40 +0000


I've not noticed this happening pre Xcode 12 so think its a new Xcode bug.. anyone else notice this or have any pointers?

so think its a new Xcode bug

I agree that it’s a bug in Xcode but I don’t think it’s a new bug. I see similar things in Xcode 11.7.

I’m pretty sure that this is a known bug but it wouldn’t hurt for you to file your own bug about it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Feedback FB8709333 has been filed for this issue
Debugger unable to show value for Date but can for NSDate
 
 
Q