View MASM ASCIIZ Strings in Visual Studio Debugger

Started by GregL, May 19, 2005, 04:54:21 AM

Previous topic - Next topic

GregL

This is something I discovered once before and had forgotten. I just discovered how to do it again. I thought I would pass it along.

To view an ASCIIZ string from a MASM program in the Visual Studio debugger Watch window:

Use the string name as follows:

&szString,s

  or, the following will display the address of the string and then the string:

&szString


The "&" means "address of". String names in C represent the address of the string. Not so in MASM.

You can also use a pointer to the string as follows:

pszString,s

    or, for the address and the string:

pszString


If you just use the name of the string it will only display the first character. It was driving me nuts, I knew there was a way. The documentation on this isn't very clear, it's for C/C++.  :8)




Vortex