SOS: Upcoming release has a few new commands – DumpXmlDocument


If you have done much debugging with XML data, you know how difficult it can be to look at a System.Xml.XmlDocument.  They don’t just show up in the debugger as XML.  This is where this command comes into play.  It will take a XmlDocument as input and will print out the entire XML for that document.

Note: It does not print out any XmlComments, XmlDeclarations, or other things at the top of the document.

The output from this command looks like:

dumpxmldocument

As you can see, this makes it much easier to look at a System.Xml.XmlDocument in the debugger.

Comments (4)

  1. ecards says:

    Tom that is pretty cool, one of those things that seems obvious after the fact.

    But you mentioned a future release, when would that be?

    I’m already running 2008 SP1 Beta 1

  2. tomchris says:

    Ecards,

    Take a look at:

    http://blogs.msdn.com/tom/archive/2008/06/04/update-coming-for-sos.aspx

    Basically, SOS for 2.0 is getting added to the debugger package.

  3. Howard says:

    Hi Tom

    I’ve installed v10.6.003.233 of WinDbg, the SOS.dll that ships with this has the dumpxmldocument command (but no dumpstat as mentioned in another post here) but it’s a 1.1 version of SOS. Where can I get a .NET 2.0 version of SOS that contains dumpxmldocument? You can’t imagine how useful that command is for me, but I need it for .NET 2.0. Thanks Howard

  4. tomchris says:

    Howard,

    We are actively working on trying to get that out to anyone that wants it.  I’ll try to keep you posted.