简体   繁体   English

Visual Studio,在监视窗口中查看变量的内存地址

[英]Visual Studio, See variable's memory address in watch window

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). IIRC Visual Studio为C ++做了这个(我知道QtCreator / Eclipse会这样做)。 Is there a simple way I can do this in Visual Studio for a C# program? 有没有一种简单的方法可以在Visual Studio中为C#程序执行此操作?

Any help will be appreciated. 任何帮助将不胜感激。 Thank you, 谢谢,

Jec JEC

Put a debug point, Start your application, when that debug point is hit, Go to Debug -> Windows -> Memory 放置一个调试点,启动你的应用程序,当命中该调试点时,转到Debug - > Windows - > Memory 在此输入图像描述

There in Address textbox type, the name of variable, and you will be able to see the address. Address文本框类型中,变量名称,您将能够看到地址。

Short-cut key in Visual Studio 2012 appears as Cntl + Alt + M, 1 Visual Studio 2012中的快捷键显示为Cntl + Alt + M, 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM