本文介绍了Visual Studio,在监视窗口中查看变量的内存地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯在监视窗口中使用的一个特殊功能是变量的内存地址.IIRC Visual Studio针对C ++做到了这一点(我知道QtCreator/Eclipse可以做到).我可以在Visual Studio中为C#程序执行此操作的简单方法吗?

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,

杰克

推荐答案

放置一个调试点,启动您的应用程序,当该调试点被击中时,转到Debug-> Windows-> Memory

Put a debug point, Start your application, when that debug point is hit, Go to Debug -> Windows -> Memory

Address 文本框类型中,有变量的名称,您将能够看到该地址.

There in Address textbox type, the name of variable, and you will be able to see the address.

Visual Studio 2012中的快捷键显示为 Cntl + Alt + M,1

Short-cut key in Visual Studio 2012 appears as Cntl + Alt + M, 1

这篇关于Visual Studio,在监视窗口中查看变量的内存地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 15:37