WinDbg PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

WinDbg / SOS Cheat Sheet

Environment Loading SOS


Attach to process F6 Load SOS for .NET 1.x .load clr10\sos
Detach from a process .detach Load SOS for .NET 2.0 .loadby sos mscorwks
Break debuggee execution Ctrl-Break
Continue debuggee execution g
Exit WinDbg q Examining the Managed Environment
Clear the screen .cls Dump runtime type information !dumpruntimetypes
View managed threads !threads
View managed call stack !clrstack
Getting Help View combined managed / unmanaged !dumpstack
Debuggee commands ? callstack
Debugger commands .help View function call arguments !clrstack –p
Online help file .hh command View local variables !clrstack –l
Help on extension on top of chain !help View object dump !do address
Help on specific extension command !help command View array dump !da address
View object size (including children) !objsize address
View heap usage by type !dumpheap -stat
Issuing Commands View heap usage filtered by type !dumpheap -type type
Scroll through command history [up], [down], [enter] View GC roots of object instance !gcroot address
Paste into command window [right-click] View managed sync blocks !syncblk
View managed thinlocks (CLR 2.0) !dumpheap –thinlock
View information on most recent !printexception
exception
Examining the Unmanaged Environment !bpmd module method
Set a breakpoint
List loaded modules with full path lmf
List loaded modules with last modified lmt
timestamp
List unmanaged threads ~
Select active thread ~thread_id s
View call stack k
View thread CPU consumption !runaway
Set a breakpoint bp
Dump small memory image .dump path
Dump large memory image .dump /ma path

You might also like