This is a summary from the article http://beta.blogs.msdn.com/tess/archive/2007/10/19/net-finalizer-memory-leak-debugging-with-sos-dll-in-visual-studio.aspx

 From this article, I learned how to use SOS in Visual Studio. SOS can be a great help for debugging managed application.

1,  Enable native debugging for the project

Visual Stduio 中也可以用SOS调试.NET程序

2, Use “break all” menu ( under Debug\Break all ) to break

 

3, Load SOS.dll by using “.load” command in immediate window

Visual Stduio 中也可以用SOS调试.NET程序

 

4, Use “!help” command in immediate window, you can find how many useful command are available in SOS

 

5, Some general commands in SOS, You can use “ !help XXX” to find out what the XXX command is used for.

!clrstack                                        

!dumpheap – stat                     

!eeheap   -gc  

!dumpstack

!threads

!dumpobj

!gcroot

!syncblk

!objsize

!pe

!finalizequeue

 

 Very easy and very powerful!

相关文章:

  • 2022-12-23
  • 2021-09-18
  • 2022-02-16
  • 2021-07-21
  • 2021-05-15
  • 2021-09-09
  • 2022-12-23
  • 2021-09-11
猜你喜欢
  • 2021-06-30
  • 2021-05-21
  • 2021-10-19
  • 2021-07-22
相关资源
相似解决方案