Viewing 6 posts - 1 through 6 (of 6 total)
  • Bit of VS .NET 2003 help please
  • Earl
    Free Member

    VS .Net 2003 to debug some C code.

    In the watch window the values of my chars are being displayed as numbers only (ASCI in base10 I assume).
    Is that a settting that will show me both the numerical ASCI value and the 'Alphabetical' character? ie 82 = 'R'

    Hopefully I'm asking the question right as I kinda out of my depth here.

    GrahamS
    Full Member

    From memory you can right click and choose other display formats.
    It should really show the ASCII characters for the char type , unless they are being stored as int or something, in which case you can type in a suitable cast into the Watch window.

    nbt
    Full Member

    you can add multiple watches, but you will need to run a conversion on the string value which VS.net doesn't really like doing. best way might be to add a line which converts the char to a string and add a watch on that variable – either stick it in an IF #DEBUG so it doesn;t compile in release mode, or better still remove it when you;re sure your code works as required

    Earl
    Free Member

    Right mouse click only gives me option for Hex display.

    llama
    Full Member

    Normally it is pretty good at working our types. Are you being slack with typing?

    try adding a watch with a cast, eg: (char) my_var

    or use the memory window: type &my_var in the address box and you get a memory dump with binary and ASCII from that address onwards

    Earl
    Free Member

    Thanks for the replys.

    Can do all the above for specific chars but Im debugging lots and lots of preexisting code so its not pratical. I remember in a prev version VS6.0 it would show me both.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Bit of VS .NET 2003 help please’ is closed to new replies.