Showing posts with label debug. Show all posts
Showing posts with label debug. Show all posts

Thursday, January 26, 2012

Debug release mode crash

Useful information on debugging problems in release builds when all your customer has is an instruction pointer address as the error.

Gives detailed information on best practices for generating the MAP file and then using this to determine which line number and source file is causing the exception / APPCRASH / issue.

http://www.codeproject.com/Articles/3472/Finding-crash-information-using-the-MAP-file

Friday, December 02, 2011

Using Image File Execution Options (IEFO) to invoke a debugger automatically

A handy tip for invoking a debugger (or anything else) in place of a normal executable at image load time is to set the following registry key:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<image name>\Debugger = <other image name> (REG_SZ)

For example, to invoke WinDBG when the OS loads notepad.exe:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\Debugger = "C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe"

Very handy for short lived processes that are causing trouble, but you have no other means of attaching to them / etc!