Silverlight SOS Commands
Today I became rather curious of what commands Silverlight's version of SOS provided (see my Learning WinDBG/SOS and Advanced Debugging post for more information on SOS). I didn't really have any guess to whether there would be more, less, or the same. So I ran Silverlight's SOS.dll through .NET's dumpbin.exe application with the /exports switch to get a list of what you can do with it. In this case, the lower case DLL exports are the actual SOS commands you can use. I did dumpbin.exe on the .NET 2.0 version and did a diff between them. The results? The Silverlight version of SOS actually has more commands than the .NET version.
Here is a list of SOS commands that aren't in the .NET version:
You can type these into your debugger to see the specific syntax for each of these. For detailed information on most of these, you'll have to wait until something gets posted on MSDN or one of the SOS developers post something. For a few, however, Sasha Goldshtein has provided some information and examples. Here are some posts from this person's web site where you can find information no some of these new commands:
- New Silverlight SOS.DLL Command: !AnalyzeOOM
- New Silverlight SOS.DLL Commands: !HeapStat and !GCWhere
- New Silverlight SOS.DLL Commands: !FindRoots and !ListNearObj
In case you're wondering, the .NET version has a few commands that the Silverlight version didn't have too. This isn't a big deal as the commands that are missing don't really have much meaning for Silverlight (or have an alternative). Here's a list of these:
Also, for the sake of completeness, below is the completely list of all Silverlight commands. Just type then into WinDBG with the ! prefix to play with each of them. For many of them you can type "!sos.help COMMANDNAME" to get help for a specific COMMANDNAME.
Then there's the complete list of .NET SOS commands:
If you haven't noticed yet, most of these aren't even documented commands. However, if you type them into SOS, you will not only see that they exist, you will be given the syntax for how to use them (and, then, there's !sos.help).