- Download extension from latest GitHub release or from Latest build.
- Extract it to some folder (don't forget to "Unblock" zip file before extraction)
- Load it into WinDbg session using .load commnd. For example:
.load C:\debuggers\winext\SharpDebug.WinDbg.x64.dll
Use !execute
command exported from SharpDebug.WinDbg extension:
!execute path_to_csx_script [optional arguments given to the script]
For example:
!execute C:\Scripts\myscript.csx
In case you have one more extension that exports !execute command, you must specify extension at the beginning:
!SharpDebug.execute c:\Scripts\myscript.csx
Learn more about writting scripts in Tutorials.
Use !interactive
command exported from SharpDebug extension:
!SharpDebug.interactive
Interactive mode can execute both WinDbg commands and C# expressions. C# expression saves the state and must end with semicolon (;). WinDbg commands start with #dbg. For example you can enter following commands and not get an error:
var a = Threads[0];
#dbg kn
writeln("{0}:{1}", a.Id, a.SystemId);
Learn more about easier scripting in interactive mode.
Use !openui
command exported from SharpDebug extension:
!SharpDebug.openui
UI interactive mode is more powerful than regular interactive mode as it provides C# editor, completion window, XML documentation, etc.
Learn more about easier scripting in interactive mode.