
8.11.2004
Debugging a Release Build
Working on an exception in a release build (WinForms) - how to best debug. Starting with this guy's take on debug symbols, the .ini file (which doesn't seem to work for me), and the MSDN Library.
Line numbers in stack trace.
What I've found so far:
Helpful links:
The INI file that sits with the EXE to turn on/off optmize and tracking. (I tried this, and didn't see any additional info - at least in the stack trace shown from the exception)
Enable JIT-attach debugger (2 different reg settings - for managed and unmanaged code)
Line numbers in stack trace.
What I've found so far:
- As with Win32 c++ code, you should generate .PDB symbol files for release builds. (project properties, generate debug info = true)
- Keep the PDB somewhere safe, where you can get back to the corresponding PDB for an exe out in production that's barfing.
- Also like Win32 code, the path to the .pdb is buried in the release EXE, so if it can be found at runtime, the symbols will be loaded. (but haven't figured how to point the debugger somewhere ELSE to find the PDB's. above article seems to say you can, but not HOW)
- Exception.StackTrace for release builds shows the stack with function names, but no line numbers. Cool feature: the existence of the .PDB in the same directory as EXE makes the stack trace automagically show line numbers!
Helpful links:
The INI file that sits with the EXE to turn on/off optmize and tracking. (I tried this, and didn't see any additional info - at least in the stack trace shown from the exception)
Enable JIT-attach debugger (2 different reg settings - for managed and unmanaged code)
Comments:
Post a Comment