0

I try to use Debug Diagnostic Tool to create Minidump every time when a particular method is invoked.

I started with simple console app:

namespace FastFailApp {
    class Program {
        static void Main(string[] args) {
            Console.WriteLine("Starting...");
            for (int i = 0; i < 20; i++) {
                Console.Write(".");
                Thread.Sleep(1000);
            }
            Environment.FailFast("Not so unexpected failure...");
        }
    }
}

Then I created rule in DebugDiag to create minidump on every Program.Main call: screenshot of debugdiag Unfortunately it didn't work, in DebugDiag log I got message:

[12/9/2015 8:05:15 PM] Attempting to set managed breakpoint at FailFastApp.dll!FailFastApp.Program.Main
[12/9/2015 8:05:15 PM] bpID = -2
[12/9/2015 8:05:15 PM] Current Breakpoint List(BL)
SYMSRV:  https://msdl.microsoft.com/download/symbols/kernel32.pdb/996C94DB18DE43688CA110D2FF25B8542/kernel32.pdb not found
SYMSRV:  C:\Program Files\DebugDiag\sym\kernel32.pdb\996C94DB18DE43688CA110D2FF25B8542\kernel32.pdb not found
DBGHELP: C:\Windows\system32\kernel32.pdb - file not found
DBGHELP: kernel32.pdb - file not found
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\KERNEL32.dll - 
DBGHELP: KERNEL32 - export symbols
SYMSRV:  https://msdl.microsoft.com/download/symbols/ntdll.pdb/6048FDB62DCD41C18835594844CE71432/ntdll.pdb not found
SYMSRV:  C:\Program Files\DebugDiag\sym\ntdll.pdb\6048FDB62DCD41C18835594844CE71432\ntdll.pdb not found
DBGHELP: C:\Windows\SYSTEM32\ntdll.pdb - file not found
DBGHELP: ntdll.pdb - file not found
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\SYSTEM32\ntdll.dll - 
DBGHELP: ntdll - export symbols
[12/9/2015 8:05:15 PM] Thread exited. Exiting thread system id - System ID: 3568. Exit code - 0x00000000
CLR: Managed code called FailFast, saying "Not so unexpected failure..."

I already set symbol server in DebugDiag and I checked this configuration with WinDBG: enter image description here

Does anyone have any suggestions?

PS. App that I try to debug is 64 bit. I tried to add current process directory (with pdb files) to symbol path, and used various formats for breakpoint expression (like Module!Class::Method or Module.dll!Class.Method(OtherType)) without sucess.

csharpfolk
  • 4,124
  • 25
  • 31

1 Answers1

0

Shouldn't it be FailFastApp.exe!FailFastApp.Program.Main ? Not sure if you have put the code in a class library and compiled it as a DLL but if you have not done that, then it should be .exe

If that doesn't work then see if you can get dumps on sleep method by using this breakpoint

mscorlib.dll!System.Threading.Thread.Sleep

Hope this helps

Puneet Gupta
  • 2,237
  • 13
  • 17