简体   繁体   English

使用Visual Studio 2010进行故障转储调试

[英]crashdump debugging with Visual Studio 2010

I am trying to get crash dump debugging working with 2010, but it keeps failing. 我正在尝试使崩溃转储调试与2010一起使用,但始终失败。

I get this error when I try to start debugging: 尝试开始调试时出现此错误:

"Managed Minidump Debugging: The signature verification for the file 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscordbi.dll' failed with the error 0x800700c1.: “托管的小型转储调试:文件'C:\\ Windows \\ Microsoft.NET \\ Framework \\ v4.0.30319 \\ mscordbi.dll”的签名验证失败,错误0x800700c1。

I'm using the simplest program I can think of just to get off the ground (below). 我使用的是我想到的最简单的程序(下图)。

Here are the steps I am taking: 这是我正在采取的步骤:

  1. Build 建立
  2. Run with a double-click from Windows explorer 通过Windows资源管理器双击运行
  3. right-click on the process in TaskManager, and select "Create Dump File" 右键单击TaskManager中的进程,然后选择“创建转储文件”
  4. kill the process 杀死进程
  5. open the dump file in Visual Studio (File | Open, set filter to crash dumps) 在Visual Studio中打开转储文件(“文件” |“打开”,将过滤器设置为崩溃转储)
  6. Select "Debug with Mixed" 选择“混合调试”

much loading of symbols (I have MS Symbol server enabled) 符号加载过多(我已启用MS Symbol服务器)

Boom (I get an error dialog saying I need to specify my symbol path -- which I believe I have done -- MS symbol server is enabled, and my solution is loaded) Boom(出现错误对话框,提示我需要指定我的符号路径-我相信我已经完成了-启用了MS符号服务器,并加载了我的解决方案)

In the output window, I get the following error (note that there are also a bunch of successful symbol loads, including for my exe): 在输出窗口中,出现以下错误(请注意,还有很多成功的符号加载,包括我的exe):

Managed Minidump Debugging: The signature verification for the file 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscordbi.dll' failed with the error 0x800700c1. 托管的小型转储调试:文件'C:\\ Windows \\ Microsoft.NET \\ Framework \\ v4.0.30319 \\ mscordbi.dll'的签名验证失败,错误0x800700c1。

(All the while, the solution with the code for my exe is loaded in the Visual Studio instance). (一直以来,带有exe代码的解决方案都已加载到Visual Studio实例中)。

Any idea what I am doing wrong? 知道我在做什么错吗? Is this the right procedure for crashdump debugging in VS 2010? 这是在VS 2010中进行崩溃转储调试的正确过程吗?

The test dummy program: 测试虚拟程序:


    class Program
    {
        public static string AStaticProperty = "Hello World";
        static void Main(string[] args)
        {
            DoLoop(10000);
        }

        static void DoLoop(int iterations)
        {
            for (int i = 0; i < iterations; i--)
                System.Threading.Thread.Sleep(500);
        }
    }

Edit 编辑

I'm going to vote to close -- I don't know exactly what the deal is, but everything is working now. 我将投票决定要结束交易-我不确切知道这笔交易是什么,但现在一切正常。

Here's what I did: 这是我所做的:

  1. I started debugging the running process in VS 2010 我开始在VS 2010中调试运行过程
  2. I used the "save dump file" option off of the debug menu in 2010 我在2010年的调试菜单中使用了“保存转储文件”选项
  3. I stopped the process and loaded the dump file. 我停止了该过程并加载了转储文件。

It worked, so I thought "hmm, maybe the problem was with the dump file that I created (had used both adplus and TaskManager). 它起作用了,所以我想:“嗯,也许问题出在我创建的转储文件上(曾经使用过adplus和TaskManager)。

But no, now those work too. 但是不,现在这些也可以工作。 (although they failed very reliably until I did the 3 steps above). (尽管它们非常可靠地失败,直到我完成了上面的3个步骤)。 Weird, but now I cannot repro, so I'm going to vote to close. 很奇怪,但是现在我不能再责备,所以我要投票关闭。

也许这个问题/答案“调试C#代码时出现的符号问题”可以帮助您。

The common tool used to debug dumps is WinDbg which is available in Debugging Tools for Windows. 用于调试转储的常用工具是WinDbg,可在Windows调试工具中找到。 For x64 dumps you need the x64 debugger, while for x86 you need x86 debugger. 对于x64转储,您需要x64调试器,而对于x86,则需要x86调试器。

Visual Studio is x86 only, so you should not expect it can debug all dumps. Visual Studio仅是x86,因此不要指望它可以调试所有转储。

I think that this was an unstable machine/need a reboot issue. 我认为这是不稳定的机器/需要重新启动问题。 I have been unable to repro the problem 我一直无法解决这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM