Add feature to Debugger to view an object's memory footprint/usage - by Dave Black

Status : 

  Other<br /><br />
		This item had a custom resolution.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 637373 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 1/21/2011 6:59:16 AM
Access Restriction Public


I have many times wanted to see the memory footprint/usage of an object while debugging in VisualStudio.  As far as I know, the only way to accomplish this is to use WinDbg and it's !objsize command.  Obviously, you can only use 1 debugger at a time on a process, so you can't switch over to WinDbg and use it while on a breakpoint in VisualStudio.  I'm adept at using WinDbg for analyzing memory dumps - but live debugging with breakpoints there is a different story and certainly not intuitive.

I had heard a while back on a Microsoft Team or individual's blog about some features of WinDbg being incorporated into VisualStudio - was this ever done?  If so, which ones?

Please consider the ability to view an object's total memory footprint (including aggregate objects) as well as being able "drill-down" and view the memory usage broken down by the object and each of it's members).

Thank you for your consideration. 
Sign in to post a comment.
Posted by Microsoft on 1/26/2011 at 12:30 PM
Hey Dave,

Thank you for your suggestion. This is a very good suggestion and we are looking into ways of improving the overall experience that exists today for this in a future release. For now, you should be able load SOS in the immediate window depending on the version of VS ( to get at least some of the experience you're looking for.

Depending on your VS version, you can also try using managed memory profiling that is included in the Premium sku to find out the size and lifetime of managed objects ( We are looking into ways of improving and better integrating this experience for a future release.

Thanks again for your feature suggestion.

Marc Paine
Visual Studio Profiler QA Lead
Posted by Microsoft on 1/21/2011 at 7:13 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(