开发者

Display WCHAR Strings in Xcode Debugger

开发者 https://www.devze.com 2022-12-24 15:23 出处:网络
I\'d like to preview WCHAR strings开发者_开发技巧 in the variable display of the Xcode 3.2 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

精彩评论

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

关注公众号