Don't debug an unmanaged application
Since most of the world is .NET these days, its my tendency to think I can find everything using SOS. Recently, I was attempting to debug a Windows service (Office SharePoint Server Search), and mentally thought "Well, its SharePoint, which is nothing more than a large .NET application, do its .NET as well." After opening Windbg, and trying to load SOS, I got the following error:
"Failed to find runtime DLL (mscorwks.dll), 0x80004005
Extension commands need mscorwks.dll in order to have something to do."
This perplexed me until I realized I was trying to debug an application that is not managed. To prove this, I ran the "lmvm mscorwks" command to see if mscorwks.dll was loaded. It wasn't.
"Failed to find runtime DLL (mscorwks.dll), 0x80004005
Extension commands need mscorwks.dll in order to have something to do."
This perplexed me until I realized I was trying to debug an application that is not managed. To prove this, I ran the "lmvm mscorwks" command to see if mscorwks.dll was loaded. It wasn't.