Often when you’re working on bug hunting, VS’s JIT Debugger became totally unusable cause it hasn’t a refined mechanism of exception inspection and no great aids for Post-Mortem Debugging, so became necessary to switch to the actual Lord of Debuggers..WinDbg (obviously after Sacred SoftICE :))so let’s disable the VS JIT that in case of crash will acts as the Handler of the occured Unhandled Exception.
Open VS Tools->Options->Debugging -> Just-In-Time Debugging and disable Native, Managed and Script
Now every application that crashes has not a debugger that handles the exception, let’s actualize WinDbg as JIT Debugger.
Go into WinDbg directory (Debugging Tools for Windows) and type
Now if all is ok a success MessageBox shoud appear.
Now try to cause an unhandled exception, for example by calling a buggy application, if Windbg popups it means that all works fine.
Now could happen that the unhandled exception is Unknown and windbg breaks when the execution is finished so we don’t have great information, no exception informations of reg/stack infos, but is here the power of windbg we can set Event Filters for all kind of exceptions known or not.
For example Unknown exception – code e0000001 (first chance)
We can put directly a break point when this unknown exception happens!🙂
To remove breakpoint type:
See you to the next post..🙂