使用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.
- Open the crash dump by Visual Studio, then you can see the dump file summary tab after the loading is done.
- Setup symbols path: there are two ways to do this.
- Click "Set symbol paths" link in the dump file summary tab
- Select menu "Tools" -> "Options..." , then enter "Symbols" tab under "Debugging" branch
- Setup sources path:
- In "Solution Explorer", select "Property" in the context menu of the solution
- Add source paths in "Directory containning source code" list control in "Debugging Source Files" tab
- Start debugging by click "Debug with Mixed" or "Debug with Native Only" link in the dump file summary tab
本文介绍如何使用Visual Studio 2010分析.NET程序崩溃产生的dump文件,相较于Windbg,VS2010能更好地定位C#源代码层面的问题。文章详细步骤包括打开dump文件、设置符号路径、添加源文件路径及开始调试。
1863

被折叠的 条评论
为什么被折叠?



