开发者

Display WCHAR Strings in Xcode Debugger

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜