Ask a questionAsk a question
 

AnswerManaged dumps

Answers

  • Thursday, November 05, 2009 10:34 PMAndrew B Hall - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello,

    First of all, Tess's blog post is referencing Visual Studio 2010 Beta1, the "huge green arrow" has been removed from Beta2, now you need to use the "Debug with Mixed" hyperlink on the right side of the page.  If you selected "Debug with Native Only" that would produce the behavior that you are seeing.  Also, you need to verify that symbols have loaded correctly by checking the Modules Window (Debug->Windows->Modules) once you are debugging.  If you would like to see a video demonstrating Managed Minidump debugging using Beta2, it begins at the 14:45 mark of this channel 9 video: http://channel9.msdn.com/shows/10-4/10-4-Episode-34-Debugger-Enhancements-and-Improvements/

    It is possible that somehow the dump file was not created correctly as well, and so a couple of thoughts on creating the dump.  If you are simply interested in playing with the feature and have no need to automatically capture dumps, the simplest and most reliable way to capture a dump for your own application is to run it under the debugger (F5), and when it crashes use the Debug menu to "Save dump as...". 

    If it is not your own application, or you cannot run it under the debugger, attach Visual Studio to the process (Tools->Attach to Process), and when the application that the Visual Studio debugger is attached to crashes, Visual Studio will pop up a dialogue asking if you would like to break or continue, select "Break" and "Save dump as..." from the debug menu.  Dumps can also be created from the Process tab in Task Manager by right clicking and selecting "Save Dump". 

    Also, only dumps of .NET 4.0 processes can be debugged using Visual Studio, if your dump was of a 3.5 or earlier process, then it will be native only debugging inside Visual Studio.

    Hope that helps!


    Best Regards, Andrew Hall. Visual Studio Debugger.

All Replies

  • Thursday, November 05, 2009 5:01 PMKarel ZikmundMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I didn't try it myself, but the second link (Tess's blog post) shows step-by-step guide how to do it.
    Do you have your app compiled as debug?
        > 3. Mileage varies depending on if your app is compiled debug, you have source lined up etc.   If the app is not compiled debug you will not get things like locals or source synchronization.

    If it still doesn't work for you, can you post here a simple repro (the smaller the better) and some links to screenshots how it didn't work?
    Also which version do you use? Beta1 or Beta2?

    Thanks,
    -Karel
  • Thursday, November 05, 2009 10:20 PMVáclav Dajbych Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
  • Thursday, November 05, 2009 10:34 PMAndrew B Hall - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello,

    First of all, Tess's blog post is referencing Visual Studio 2010 Beta1, the "huge green arrow" has been removed from Beta2, now you need to use the "Debug with Mixed" hyperlink on the right side of the page.  If you selected "Debug with Native Only" that would produce the behavior that you are seeing.  Also, you need to verify that symbols have loaded correctly by checking the Modules Window (Debug->Windows->Modules) once you are debugging.  If you would like to see a video demonstrating Managed Minidump debugging using Beta2, it begins at the 14:45 mark of this channel 9 video: http://channel9.msdn.com/shows/10-4/10-4-Episode-34-Debugger-Enhancements-and-Improvements/

    It is possible that somehow the dump file was not created correctly as well, and so a couple of thoughts on creating the dump.  If you are simply interested in playing with the feature and have no need to automatically capture dumps, the simplest and most reliable way to capture a dump for your own application is to run it under the debugger (F5), and when it crashes use the Debug menu to "Save dump as...". 

    If it is not your own application, or you cannot run it under the debugger, attach Visual Studio to the process (Tools->Attach to Process), and when the application that the Visual Studio debugger is attached to crashes, Visual Studio will pop up a dialogue asking if you would like to break or continue, select "Break" and "Save dump as..." from the debug menu.  Dumps can also be created from the Process tab in Task Manager by right clicking and selecting "Save Dump". 

    Also, only dumps of .NET 4.0 processes can be debugged using Visual Studio, if your dump was of a 3.5 or earlier process, then it will be native only debugging inside Visual Studio.

    Hope that helps!


    Best Regards, Andrew Hall. Visual Studio Debugger.
  • Saturday, November 07, 2009 10:00 AMVáclav Dajbych Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,
    I tried another situations and my result is that it works only when I have Commom Language Runetime Exceptions checked to Thrown and I save dump as file. Then it will show code with marked line, local variables and callstack. It's fine! But I would like to generate this dump when my application on customer's machine shuts down. When I have the dump generated by JIT, there is no exception information "An exception came from the CLR". Other thing I observed is that no callstack and code are shown when I debug application normally under Visual Studio 2010 Beta 2 with unchecked Thrown in Commom Language Runetime Exceptions. I see even less compare to dump generated by JIT. I'm confused and I don't know where is the mistake.