So I found Junfeng Zhang's great article: "From Unhandled Exception for Debugging Application"
This is called Postmortem debugging options, you can configure the postmortem debugger yourself in the Windows registry when Visual Studio installed the registry key \\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug
contains:
"C:\WINNT\system32\vsjitdebugger.exe" -p %ld -e %ld
So, the Visual Studio JIT debugger is defined as the default postmortem debugger.
Just key points: (see article for more details)
Windows can handle user-mode errors in various ways. The following sequence shows the priority used for error handling:
If the user mode debugger is currently connected to the crash process, all errors will cause the target to penetrate this debugger.
If no user debugger is connected, and the executable code has its own exception handling procedures (for example, try - except), this exception handling procedure will try to deal with the error.
- If the user mode debugger is not connected, and Windows has an open connection for debugging the kernel, and the error is breaking the breakpoint, Windows will try to contact the kernel debugger.
source share