Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
10-4 Episode 34: Debugger Enhancements and Improvements
Nov 02, 2009 at 9:16 AMProbably the easiest way is to launch the sysinternals 'ProcDump' tool (see http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx) passing your process id on the command line. You may want to do this from an AppDomain.UnhandledException event, or from an exception filter written in IL/VB. If you write out the dump from a catch block, the original variables will be lost, though you will still have acess to any variables viewable from the catch block.
The alternative to creating ProcDump/WinDbg is to P/Invoke to dbghelp!MiniDumpWriteDump. However, its not reliable to write a minidump file of your own process (calling MiniDumpWriteDump with hProcess/ProcessId = GetCurrentProcess()/GetCurrentProcessId()), and you will likely find the P/Invokes harder to get correct then a call to System.Diagnostics.Process.Start.