Keith McNamee Keith McNamee - 1 year ago 112
Swift Question

IOS Swift debugging in Xcode/AppCode - I can't look in to my dictionary contents

If I put a simple dictionary such as this in my Xcode project:

var myDictionary:[String: String] = [
"a": "line 1",
"b": "line 2"]

I would expect to be able to look browse the contents of the dictionary when I'm debugging in Xcode. However what Xcode tells me is:

´╗┐´╗┐myDictionary [String : String] 0 key/value pairs

There is the option to "Print Description" when I right click however this is not exactly what I need. Ideally I would be able to view the contents in the foldable tree structure you typically get from debugging, whereas this will spit the entire contents out on the page

Also I prefer to use Jetbrains AppCode for building my projects and from what I can see there is no "Print Description" there. If I'm wrong on this and if anyone can point me to one I would appreciate it

Answer Source

I've solved this myself now (for the most part). It only happens when I debug using the iPhone 5 in the simulator. If I even move up to iPhone 5s the debugger works as I would expect.

This still leaves a bug where you can't debug properly on an iPhone 5 but this is not an issue for me and is something that i imagine Apple themselves would need to think about rather than me

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download