Dan Crevier's Blog

In search of a better name...

Managed code debugging tip: Make object ID

When debugging native code, it's easy to keep track of objects by their addresses. But, with managed code, you don't really have this option. This can make it hard to tell keep track of objects. But, when debugging in Visual Studio (at least 2005), you can right click an object and select "Make Object ID". This will put a number like {1#} after the object. You can do this on as many objects as you want to track. I found this really useful in investigating a bug that involved some nasty recursion and reentrancy.
Published Friday, February 10, 2006 9:41 PM by dancre
Filed under:

Comments

 

leppie said:

I wondered what that was for :) Thanks for the tip!
February 11, 2006 6:00 AM
 

jmstall said:

That's a great new feature for VS2005 (which was sorely missing in VS2003). It's build on new debugging support in .NET 2.0. A description of how it's implemented is here: http://blogs.msdn.com/jmstall/archive/2005/01/08/349312.aspx
February 11, 2006 3:35 PM
 

Mike Taulty's Weblog said:

February 20, 2006 6:20 AM
 

Hardcode said:

If you have sharp eyes you've noticed a "Make Obect ID" entry in Visual Studio watch context menu. What

June 2, 2008 9:04 AM
 

Readed By Wrocław NUG members said:

With dependency properties being so heavily used across the WPF platform, there is a good chance that

July 26, 2008 12:57 AM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker