Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 1.99 KB

WinDbgExtension.md

File metadata and controls

53 lines (46 loc) · 1.99 KB

Using WinDbg extension

  1. Download extension from latest GitHub release or from Latest build.
  2. Extract it to some folder (don't forget to "Unblock" zip file before extraction)
  3. Load it into WinDbg session using .load commnd. For example:
.load C:\debuggers\winext\SharpDebug.WinDbg.x64.dll

Executing C# scripts

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.

Entering interactive mode

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.

Screenshots

Interactive mode

Entering UI 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.

Screenshots

UI interactive mode 1 UI interactive mode 2 UI interactive mode 3