개발통합환경(IDE)/XCode
[XCode] Console창에서 변수 값 보기
달님개발자
2023. 7. 9. 16:41
반응형
아래처럼 코드가 있다.
let textStorageString = layoutManager.textStorage!.string as NSString
NSString로 변환했기에 쉽게 값을 볼수 있을줄 알았는데, textStorageString에 커서를 갔다대니, NSBigMutableString이라고 나온다. ">"을 눌러서 계속 들어가봐도 내가 생각하는 문자열이 보이지 않는다.
XCode의 콘솔창에서 print textStorageString를 해봐도 똑같다.
(lldb) print textStorageString
(NSBigMutableString) $R1 = 0x00006000030ebcc0 class name = NSBigMutableString
이럴때는 print대신 po를 사용해보자. print object의 약어라고 한다.
(lldb) po textStorageString
田 中 さん、 中 華 料 理を食べたことありますか。
반응형