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
Under Debug > Windows > Memory, select Memory 1, Memory 2, Memory 3, or Memory 4. (Some editions of Visual Studio offer only one Memory window.)
To bring up the window again, click Debug > Windows > Show Diagnostic Tools. Choose Memory Usage with the Select Tools setting on the toolbar. Click Debug / Start Debugging (or Start on the toolbar, or F5). When the app finishes loading, the Summary view of the Diagnostics Tools appears.
Observe a single variable or expression with QuickWatch Start debugging. Execution pauses at the breakpoint. Select the variable a in the code. Select Debug > QuickWatch, press Shift+F9, or right-click and select QuickWatch.
Put a debug point, Start your application, when that debug point is hit, Go to Debug -> Windows -> Memory
There in Address
textbox type, the name of variable, and you will be able to see the address.
Short-cut key in Visual Studio 2012 appears as CTRL+ALT+M, 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With