Freigeben über


The Watch Window: Hexadecimal Display

Menu:  [Context Menu] -> Hexadecimal Display
Command:  Debug.HexadecimalDisplay
Versions:  2008,2010
Published:  10/14/2010
Code:  vstipTool0110

 

Sometimes you just need a little hex.  The good news is that all the Variable windows (Locals, Autos, QuickWatch, and Watch) support showing the hexadecimal display for values.  In any variable window just RIGHT CLICK anywhere and choose Hexadecimal Display:

image

 

 

You will now have hex values displayed for the values:

image

 

 

You can reverse this process to turn the hex display off as well.  These values are particularly useful when you are dealing with data that requires any hex input for values.  It is rarely used but very useful when you need it.

Comments

  • Anonymous
    October 13, 2010
    You can also put a button for this on your toolbar. FYI, with the important links and tag cloud on the top above the article, that's the only thing I see on my screen when I load the page.  I have to scroll down to see the article.

  • Anonymous
    May 25, 2011
    It doesn't apply to text strings tho.  Is there a quick and easy way to see what hidden characters are in a string value?  I mean, I can't even tell quickly if there is r or n or both in a string.

  • Anonymous
    May 25, 2011
    Interesting question.  I found an answer on Stack Overflow that may provide a solution: stackoverflow.com/.../how-do-i-see-the-hex-values-of-a-string-in-a-vs2008-watch-window Looks like it would be a good tip to write about at some point in the future. Z