My app uses Swift and a 3rd-party library in Objective-C. When my debugger steps into the Objective-C code, the debug console does not show the values of my Swift string correctly. Instead, it shows unable to read data. How can we resolve this issue?
3 Answers
Answers 1
If you are using xcode 7.3 you can debug swift classes but xcode less than 7.3 you can debug for objective c class. Both swift and objective c support is not there. You can copy paste those objective c variables and you can print objective c variables by "po objectiveC_variable".
Answers 2
I suppose you might be using objective C bridging header also to use objective c library in Swift. I see both email and password is shown as Swift._NSContiguousString.And that may be the case if the bridging header that you made for your library might be giving some problem or not executing properly ,not sure. Because if the bridging was working then Swift._NSContiguousString would have been treated as "NSString" and you could convert it to as "String" simply.This is what I think ,you can jus check on the bridging header.
Answers 3
you can use po {{variable_name}}
on lldb for print runtime value and also use e {{variable_name}}
for print and e {{variable_name}} = {{value}}
for set new value.
attention: when you use po autocomplete work, but when use e autocomplete doesn't work.
0 comments:
Post a Comment