次の方法で共有


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.

Comments

  • Anonymous
    February 10, 2006
    I wondered what that was for :) Thanks for the tip!

  • Anonymous
    February 11, 2006
    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

  • Anonymous
    June 02, 2008
    If you have sharp eyes you've noticed a "Make Obect ID" entry in Visual Studio watch context menu. What

  • Anonymous
    July 25, 2008
    With dependency properties being so heavily used across the WPF platform, there is a good chance that