0

I'm trying to see the contents of an NSData variable data in the Xcode debugger. This question asks the same thing but regards to an Objective C pointer to an NSData variable. How can you do this with a Swift NSData variable?

Note in this case the data is a String.

Community
  • 1
  • 1
Marcus Leon
  • 55,199
  • 118
  • 297
  • 429

1 Answers1

7

If you want to see the string representation of your NSData variable you can use the following code in the debugger

po NSString(data: yourData, encoding: NSUTF8StringEncoding)
Gustanas
  • 406
  • 3
  • 13