Create a minidump of managed application

  • Thread starter Thread starter Satya
  • Start date Start date
S

Satya

Hi,
I need to create a minidump or a fulldump in C# whenever my managed
application hangs or crashes. I know we can do this manually by using
Mdbg / ADplus etc.. But is it possible to do this programatically from
within the application itself.

thanks,
Satya.
 
Satya,

When you catch the exception you can use the properties of the exception
object returned to get a dump of the stack using the following generic code.

try
{
// do something
}
catch(Exception e)
{
MessageBox.Show(e.StackTrace);
}

Hope this helps
Regards
Scott Blood
C# Developer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top