ChaosSpeeder
ChaosSpeeder

Reputation: 3508

Xcode Beta 2 - How can I see the values on swift strings in the debugging window

is there a way, to view the value of a Swift String in Xcode Beta 2.

Thank you


After reading the first answers, both methods doesn't seem to work reliable:

couldn't see the evernoteContent String parameter

the parameter to the function, evernoteContent will not be resolved. When I use the lldb po command, I've got a EXC_BAD_ACCESS or maybe the whole Xcode Beta 2 is crashing.

But there is a string value in evernoteContent.

Upvotes: 3

Views: 2859

Answers (2)

vladof81
vladof81

Reputation: 26499

One way is what Paul Robinson pointed out. Also I normally do the following, set a break point, and examine variables in Variables View. Use Quick Look and Print Description buttons at bottom left.

enter image description here

Upvotes: 2

elasticrat
elasticrat

Reputation: 7160

If you set a breakpoint in your code you can print any variable with the po command like this:

(lldb) po myString
"hello"

Upvotes: 2

Related Questions