开发者

catch crash in windows

I have a very short running process which is crashing on windows. I would like t开发者_StackOverflow中文版o 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?


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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜