如何使用VS2010分析.net dump

来源:互联网 发布:怎么复制淘宝宝贝详情 编辑:程序博客网 时间:2024/05/21 06:51

如何使用VS2010分析.net dump

分类: windows 163人阅读 评论(0) 收藏 举报
dumpwindows

    使用windbg来分析windows平台上的.net程序crash产生的dump文件是一件很困难的事情,因为分析出来的结果都分装在.net里面,我们往往得不到有用的信息,进而就拿这种crash毫无办法。

    近来发现vs2010可以作为一个很好的工具来分析这种dump,因此记录下来,备忘。

    

I find Visual Studio is better tool to analyze C# crash dump than WinDbg, in which you can locate the crash in the layer of C# source code.

 

Below,I give steps to analyze C# crash dump in Visual Studio 2010.

  1. Open the crash dump by Visual Studio, then you can see the dump file summary tab after the loading is done.
  2. Setup symbols path: there are two ways to do this.
    1. Click "Set symbol paths" link in the dump file summary tab
    2. Select menu "Tools" -> "Options..." , then enter "Symbols" tab under "Debugging" branch
  3. Setup sources path:
    1. In "Solution Explorer", select "Property" in the context menu of the solution
    2. Add source paths in "Directory containning source code" list control in "Debugging Source Files" tab
  4. Start debugging by click "Debug with Mixed" or "Debug with Native Only" link in the dump file summary tab
0 1