Load-DbgExtension

Loads a debugger extension into the debugger. Having the SOS extension loaded is essential for any PowerDbg commands that work with managed objects.
This is the equivilent of the debugger's .load and .loadby commands.

Examples

Loading an extension based on the location of a module loaded in the process (.loadby):
> Load-DbgExtension sos mscorwks
> Invoke-DbgCommand !help


Loading an extension from the debugger's program directory or fully qualified path (.load):
> Load-DbgExtension sosex
> Load-DbgExtension C:\psscor2\amd64\psscor2.dll
> Invoke-DbgCommand !help

Notes

  • You can use Get-DbgModules to check which modules are loaded before executing this
  • Using the -sos parameter on New-DbgSession will auto-load SOS for you, if the process has the CLR loaded. This already accounts for module name differences between .Net 2 processes (mscorwks) and .Net 4 processes (CLR)
  • Invoke-DebuggerCommand .chain will show all loaded debugger extensions
  • Copying debugger extensions other than SOS (like SOSEX) to the matching debugger folder for the bittyness of the extension will save time

Last edited Nov 15, 2010 at 3:01 PM by piers7, version 2

Comments

No comments yet.