문제

I'd like to preview WCHAR strings in the variable display of the Xcode 3.2 debugger.

Bascially if I have

 WCHAR wtext[128];
 wcscpy(wtext, L"Hello World");

I'd like to see "Hello World" for wtext when tracing into the function.

도움이 되었습니까?

해결책

You'll have to write a Custom Data Formatter for your wchar types, complete with your assumption of what the byte width is and what the character encoding is. THe C++ standard does not specify either of these, which is why wchar and wstring are not very portable and not well-supported on Mac OS X.

One example, with caveats about how you have to customize it for your particular mode of use, is here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top