Search code examples
carraysvisual-studiowatchlocals

How to debug array of char with more than 210 elements


I'm working with Visual Studio Express 2013 for Windows Desktop, and I would like to see the value of a variable.

This looks very easy: either open the "Locals" window and check the value, or add it to the "Watch" window, and the value can be read.

This is true indeed, but my variable is a char array (typedef char T_BufCommandLine [32768];), containing more than 210 characters, and I only see the first 210. After that, there are three dots ("..."), just mentioning that the array is not finished yet.

I know that I could expand the value of this variable, but the result is not very readable, and copying a part of this is completely impossible.

So my question: does anybody know how I can visualise the value of an array of char, which contains more than 210 characters, as one string without the "..."?


Solution

  • While on a breakpoint in the debugger, hover over your variable and click the down-arrow next to a "looking glass" icon; select "Text Visualizer".

    enter image description here

    Alternatively, use the Memory window:

    enter image description here