Automatic creation of a VisualStudio window

I am trying to automate the process of opening crash dumps for managed applications and getting a stack trace. Windgb works sometimes, but getting it to load the correct version of sos.dll is a nightmare if the machine processing the dump is hardly the same as the machine where the dump took place.

Visual Studio, on the other hand, makes the job easy. 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 everything works fine.

Can I script this process in visual studio? If not, is there a rear panel debugger used by visual studio the same as windbg?

+2


a source to share


1 answer


Instead of passing the full path to the command .load

, you can instead use a command .loadby

to give WinDbg a hint as to where the DLL should be located.
The command takes two arguments:

  • The name of the DLL you want to load (in your case SOS

    )
  • The name of an already loaded DLL, which should be contained in the same folder as the first DLL requested (in your case clr

    for .Net v4.0 or mscorwks

    earlier).


For instance:

// v4.0
>.loadby sos clr

// earlier versions
>.loadby sos mscorwks

      

+1


a source







All Articles