1

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.

zneak
  • 134,922
  • 42
  • 253
  • 328
Nicholaz
  • 1,419
  • 9
  • 11

1 Answers1

1

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.

cdespinosa
  • 20,661
  • 6
  • 33
  • 39