CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Visual C++ Debugging: How to display UNICODE strings in Watch/QuickWatch window?

    Q: I set a breakpoint in my source code to see the value of a string variable:





    But in QuickWatch and Watch windows I see only the first character of string, like in images below:








    What can I do to see the entire string contents?


    A: Your build configuration is a UNICODE one, i.e. 'UNICODE' is added in 'Project Settings\C/C++\Preprocessor definitions'.

    There are several solutions for the problem:


    • Append to the variable name 'su' formatting symbol in Watch/QuickWatch window.




    • Modify autoexp.dat file which is located in the same folder with msdev.exe.
      See the comments in autoexp.dat and Symbols for Watch Variables topic in MSDN


    • Last but not the least, go to Tools/Options/Debug and check 'Display Unicode strings'.




    Last edited by ovidiucucu; September 24th, 2012 at 08:28 AM. Reason: actualize links

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured