Reputation: 1009
I'm trying to automate the process of opening crash dumps for managed applications and retrieving the stack trace. Windgb works sometimes, but getting it to load the correct version of sos.dll is a nightmare unless the machine processing the dump is practically identical to the machine where the dump occured.
Visual Studio, on the other hand, does the job simply. I open the dump, go to the immediate window, and type
.load \\<machine where dump occured>\c\windows\microsoft.net\framework\v2.0.50727\sos.dll
!clrtsack
And eveything works just fine.
Can I script this process in visual studio? If not, is there a back end debugger used by visual studio that is the same as windbg?
Upvotes: 2
Views: 440
Reputation: 1636
Instead of passing the complete path to the .load
command, you could use the .loadby
command instead, to give WinDbg a hint about where the DLL should be located.
The command receives two arguments:
SOS
)clr
for .Net v4.0, or mscorwks
for earlier versions).For example:
// v4.0
>.loadby sos clr
// earlier versions
>.loadby sos mscorwks
Upvotes: 1