21

One particular feature I'm used to having in a watch window is a variable's memory address. IIRC Visual Studio does this for C++ (I know QtCreator/Eclipse do). Is there a simple way I can do this in Visual Studio for a C# program?

Any help will be appreciated. Thank you,

Jec

4

1 回答 1

31

放置一个调试点,启动您的应用程序,当该调试点被命中时,转到 Debug -> Windows -> Memory 在此处输入图像描述

Address文本框中输入变量的名称,您将能够看到地址。

Visual Studio 2012中的快捷键显示为CTRL++ ,ALTM1

于 2013-09-17T17:50:09.550 回答