Brian Makin
Brian Makin

Reputation: 907

catch crash in windows

I have a very short running process which is crashing on windows. I would like to catch the crash in the debugger but windbg seems to only monitor currently running processes. Is there a way to monitor for a crash in a named process?

Upvotes: 1

Views: 1555

Answers (3)

Peon the Great
Peon the Great

Reputation: 1319

WinDBG -I will catch all crashing instances. If you're only interested in the dump but don't want to change default postmortem debugger, you can use AdPlus to spawn your process:

adplus -crash -o <Output Directory> -sc <command line of your process>

The dump and additional info will be written to the folder you specified.

Upvotes: 2

Miguel Ventura
Miguel Ventura

Reputation: 10458

As far as I know, not on windbg. But you have other options, such as:

  • using cdb -o and attaching to the parent process. If you installed windbg, you probably installed cdb too. With cdb you can create a crash dump that you can open with windbg. See cdb command line options.
  • using Windbg as your postmortem debugger (by running WinDBG -I). If you have Visual Studio installed, you probably want to revert the default postmordem debugger later, check here on how to do so.

Upvotes: 1

Jaime Soto
Jaime Soto

Reputation: 3228

If you are using Visual Studio you can right-click the project and select Debug => Start new instance.

Upvotes: 0

Related Questions