I'm working on generating minidumps for my managed app. Here's what I have so far:
- I've set up an exception filter as in this article. In the filter I call MiniDumpWriteDump.
- I've been able to load the resulting dump in the VS debugger, browse the call stack and view the values of locals.
However, when optimizations are enabled in my project, the values of locals are inaccessible (I get "The value of the local or argument 'x' is unobtainable at this time"
). Now, I know why this happens - optimizations can do things like reuse locals, which means the compiled code doesn't reflect the source code anymore.
My question: is there a workaround? Some way to both get optimized code and have accessible locals? I'm not against using third-party tools for generating/viewing the minidump.
来源:https://stackoverflow.com/questions/7372535/values-of-locals-in-minidump-with-optimizations-enabled