Whenever my application throws an unhandled exception, I would like WinDbg to catch that exception on my debugging machine rather than Dr. Watson, etc. How can this be configured?
The Windows Debugger (WinDbg) can be used to debug kernel-mode and user-mode code, analyze crash dumps, and examine the CPU registers while the code executes. To get started with Windows debugging, see Getting Started with Windows Debugging.
The WinDbg Preview debugger is available in the Microsoft Store. It requires Windows 10 Anniversary Update to install. To install it, open the Microsoft Store and search for "WinDbg Preview", or use the following link to navigate directly to WinDbg Preview. Once the app is a located, select it to download and install.
To uninstall ProcDump as the postmortem debugger, and restore the previous settings, use the -u (Uninstall) option. For additional information on ProcDump, see ProcDump and Windows SysInternals Administrator's Reference by Mark Russinovich and Aaron Margosis published by Microsoft Press.
Run windbg -I
to install it at the default post mortem debugger.
As Kurt points out below WinDbg comes in both 32 and 64 bit versions. Executing windbg -I
sets up the post mortem debugger for the processes corresponding to the bitness of the debugger.
You can install both versions of WinDbg side-by-side if you need to have both the 32 and 64 bit versions available.
From the help file:
-I[S]
Installs WinDbg as the postmortem debugger. For details, see Enabling Postmortem Debugging. After this action is attempted, a success or failure message is displayed. If S is included, this procedure is done silently if it is successful; only failure messages are displayed. The -I parameter must not be used with any other parameters. This command will not actually start WinDbg, although a WinDbg window may appear for a moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With