The Watch Window: Hexadecimal Display

Tips Search

The Watch Window: Hexadecimal Display

  • Comments 3

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.

  • 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.

  • 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.

  • 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

Page 1 of 1 (3 items)
Leave a Comment
  • Please add 3 and 3 and type the answer here:
  • Post