install and how to use windbg on win 10 pro

select this link


  • how to use windbg to debug c# program

befor debug c# program , also called as  “Managed Code” ,  need load sos.dll ,

in my machine , it located at C:\Windows\Microsoft.NET\Framework64\v4.0.30319


From article :

a)  First write a console c# program



b)  build and run it in command line , then  open “windbg(X86)” , and attach to this process , then type this command :

in my machine , output is :

it show DAC  and CLR are all loaded

c) set symbol path ,  in my case , use




  • commandshow all loaded DLL


show all method table of attached program

the output like this :

With the method table address we can examine all the fuctions defined in the method. by using command

033b4d40  is a example method address , it depend on your output

it output like this :


if want to set a breakpoint at method “sendTwoTimes”

could use this command

when reach breakpoint ,  type

to display strack info , notice kL  ,  L  is upcase

view and edit registers

open registers  window


call trace



  • Ref articles