I want procdump
to listen to all exceptions (without having to specify a process name or id).
From an example given here, I thought using the following should work:
procdump -ma -i
...but although I get the message following message:
ProcDump is now set as the Just-in-time (AeDebug) debugger.
...when an exception occurs in some process, nothing gets dumped.
The exception is intentionally thrown from the following .NET code:
using System;
namespace ProcdumpTest
{
class Program
{
static void Main(string[] args)
{
if (ShouldAwaitKeyPress(args)) Console.ReadLine();
Throw();
}
static void Throw()
{
throw new InvalidOperationException();
}
static bool ShouldAwaitKeyPress(string[] args)
{
var shouldAwaitKeyPress = false;
if (args.Length > 0)
{
bool.TryParse(args[0], out shouldAwaitKeyPress);
}
return shouldAwaitKeyPress;
}
}
}
Compile it and run with either ProcdumpTest
or ProcdumpTest false
so that an exception is thrown immediately, or with ProcdumpTest true
so that it waits for a keypress to throw.
Solved thanks to @Sebastian's help:
I initially installed
procdump
underC:\Program Files
, which requires admin permissions, and although I executedprocdump -i -ma
under a run-as-administrator cmd, procmon indicated that the dump file write-access was denied.After changing the destination dump folder to a non-admin folder, the dump was successfuly created: