Viewing Memory Contents

Visual Studio 6.0

You can use the Memory window to view large buffers, strings, and other data that do not display well in the Watch or Variables window.

By default, the Memory window displays numbers in decimal (base 10) format. You can control the Memory window display by using options on the Debug tab in the Options dialog box on the Tools menu. To view Unicode in the Memory window, set the Format option to Wide Char. To display data bytes with Unicode characters, select the Show Data Bytes check box also.

To view memory contents at a specified location using drag-and-drop functionality

  1. From the View menu, click Debug Windows and Registers.

    The Memory window appears.

  2. In any window, select a memory address or pointer variable containing a memory address.

  3. Drag the address or pointer to the address section of the Memory window, and drop it.

To view memory contents at a specified location by editing

  1. From the View menu, click Debug Windows and Memory.

    The Memory window appears.

  2. Select the Memory window.

  3. In the Address box, select the memory address.

  4. Type or paste the new memory address and press ENTER.

    The Memory window displays the contents of memory locations beginning at the address specified in the Address box.

To view memory contents at a specified location using Go To

  1. From the View menu, click Debug Windows and Memory.

    The Memory window appears.

  2. Select the Memory window.

  3. From the Edit menu, click Go To.

    The Go To dialog box appears.

  4. In the Go To What box, select Address.

  5. In the Enter Address/Expression box, type or paste an address.

  6. Click Go To.

To specify a live expression for the memory location

  1. From the View menu, click Debug Windows and Memory.

    The Memory window appears.

  2. From the Tools menu, click Options.

    The Options dialog box appears.

  3. Click the Debug tab.

  4. In the Memory window Address box, type an address expression.

    You can type *pPtr, for example, to display memory contents starting at the address pointed to by pPtr.

  5. Click the Re-evaluate Expression check box.

  6. Click OK.

You can view some items more easily using live expressions. On an Intel-compatible system, you can examine the top of the stack by typing ESP as a live expression. By specifying a pointer variable, you can use the Memory window to follow the pointer as it increments through an array.

Show: