471,319 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

How to create minidumps in C#

Hello,

I need to create minidumps (or the equivalent) to debug C# applications
post-mortem. I know that it is possible in C++ using minidumps.

I read some old posts where they said that for C# it is impossible to use
minidumps (because they don't have enough information) and that the only way
was to use full dumps. But I still don't know how to configure the
application (assemblies) to create this dump and how to use them for
analysis.

Any help is appreciated.

Best regrads,
Patricio.
Jan 20 '06 #1
6 5477
Patricio,

Here are a few links that should help you:

http://www.codeproject.com/debug/pos...tandalone1.asp

http://blogs.msdn.com/scottno/archiv...26/197757.aspx

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Patricio" <Pa******@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello,

I need to create minidumps (or the equivalent) to debug C# applications
post-mortem. I know that it is possible in C++ using minidumps.

I read some old posts where they said that for C# it is impossible to use
minidumps (because they don't have enough information) and that the only
way was to use full dumps. But I still don't know how to configure the
application (assemblies) to create this dump and how to use them for
analysis.

Any help is appreciated.

Best regrads,
Patricio.

Jan 21 '06 #2
Hi Patricio,
In addition to Nicholas's comment, we also could use Stacktrace to achieve
this goal. Please refer to following article:
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdiagnosticsstackframeclasstopic.asp

I hope the above information is helpful for you. If you have any questions,
please feel free to let me know. Thanks and have a nice day!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

--------------------
From: "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com>
References: <#e**************@tk2msftngp13.phx.gbl>
Subject: Re: How to create minidumps in C#
Date: Sat, 21 Jan 2006 11:55:16 -0500
Lines: 35
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <#O**************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: cpe-24-90-143-84.nyc.res.rr.com 24.90.143.84
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.csharp:380216
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Patricio,

Here are a few links that should help you:

http://www.codeproject.com/debug/pos...tandalone1.asp

http://blogs.msdn.com/scottno/archiv...26/197757.aspx

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Patricio" <Pa******@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello,

I need to create minidumps (or the equivalent) to debug C# applications
post-mortem. I know that it is possible in C++ using minidumps.

I read some old posts where they said that for C# it is impossible to use minidumps (because they don't have enough information) and that the only
way was to use full dumps. But I still don't know how to configure the
application (assemblies) to create this dump and how to use them for
analysis.

Any help is appreciated.

Best regrads,
Patricio.



Jan 23 '06 #3
Thank you Nicholas and Terry for the information.

From what I read in the links it seems that I need to attach a debugger to
the running application to create the full user dumps.

In the C++ scenario it seems that the same application can implement a
handler to generate the dump, but it seems that this is not possible with
C#, isn't?

One more question: in a scenario where a unmanaged C++ application uses a
managed C++ dll which itself uses a C# dll, will a full dump generated by
the unmanaged C++ application (triggered by a C# dll exception) contain
information to debug the C# dll?

Thank you in advance for your answers,
Patricio.

""TerryFei"" <v-******@online.microsoft.com> wrote in message
news:05****************@TK2MSFTNGXA02.phx.gbl...
Hi Patricio,
In addition to Nicholas's comment, we also could use Stacktrace to achieve
this goal. Please refer to following article:
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdiagnosticsstackframeclasstopic.asp

I hope the above information is helpful for you. If you have any
questions,
please feel free to let me know. Thanks and have a nice day!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

--------------------
From: "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com>
References: <#e**************@tk2msftngp13.phx.gbl>
Subject: Re: How to create minidumps in C#
Date: Sat, 21 Jan 2006 11:55:16 -0500
Lines: 35
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <#O**************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: cpe-24-90-143-84.nyc.res.rr.com 24.90.143.84
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.languages.csharp:38021 6
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Patricio,

Here are a few links that should help you:

http://www.codeproject.com/debug/pos...tandalone1.asp

http://blogs.msdn.com/scottno/archiv...26/197757.aspx

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Patricio" <Pa******@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl.. .
Hello,

I need to create minidumps (or the equivalent) to debug C# applications
post-mortem. I know that it is possible in C++ using minidumps.

I read some old posts where they said that for C# it is impossible to use minidumps (because they don't have enough information) and that the only
way was to use full dumps. But I still don't know how to configure the
application (assemblies) to create this dump and how to use them for
analysis.

Any help is appreciated.

Best regrads,
Patricio.


Jan 23 '06 #4
Patricio wrote:
Thank you Nicholas and Terry for the information.

From what I read in the links it seems that I need to attach a debugger to
the running application to create the full user dumps.
You can also use userdump.exe or Dr. Watson to create dumps. userdump
works good from an "unhandled exception handler".
In the C++ scenario it seems that the same application can implement a
handler to generate the dump, but it seems that this is not possible with
C#, isn't?
It is, you can hook events for that:
Application.ThreadException
AppDomain.UnhandledException

One more question: in a scenario where a unmanaged C++ application uses a
managed C++ dll which itself uses a C# dll, will a full dump generated by
the unmanaged C++ application (triggered by a C# dll exception) contain
information to debug the C# dll?
It should be accessible via SOS.

Thank you in advance for your answers,
Patricio.


HTH,
Andy
--
To email me directly, please remove the *NO*SPAM* parts below:
*NO*SPAM*xmen40@*NO*SPAM*gmx.net
Jan 23 '06 #5
Thank you for the information Andreas. Now I have several options to
handle my situation.

Best regards,
Patricio.

"Andreas Mueller" <me@privacy.net> wrote in message
news:43*************@individual.net...
Patricio wrote:
Thank you Nicholas and Terry for the information.

From what I read in the links it seems that I need to attach a debugger
to the running application to create the full user dumps.


You can also use userdump.exe or Dr. Watson to create dumps. userdump
works good from an "unhandled exception handler".

In the C++ scenario it seems that the same application can implement a
handler to generate the dump, but it seems that this is not possible with
C#, isn't?


It is, you can hook events for that:
Application.ThreadException
AppDomain.UnhandledException

One more question: in a scenario where a unmanaged C++ application uses a
managed C++ dll which itself uses a C# dll, will a full dump generated by
the unmanaged C++ application (triggered by a C# dll exception) contain
information to debug the C# dll?


It should be accessible via SOS.

Thank you in advance for your answers,
Patricio.


HTH,
Andy
--
To email me directly, please remove the *NO*SPAM* parts below:
*NO*SPAM*xmen40@*NO*SPAM*gmx.net

Jan 23 '06 #6
Hi Patrico,,

I am glad to know that the problem has been resolved now.Thanks for
participating the community!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

--------------------
From: "Patricio" <Pa******@newsgroups.nospam>
References: <#e**************@tk2msftngp13.phx.gbl> <#O**************@tk2msftngp13.phx.gbl>
<05**************@TK2MSFTNGXA02.phx.gbl>
<eQ**************@TK2MSFTNGP11.phx.gbl> <43*************@individual.net>Subject: Re: How to create minidumps in C#
Date: Mon, 23 Jan 2006 16:31:31 -0500
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <Ov**************@TK2MSFTNGP15.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 205.152.247.15
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.csharp:380741
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Thank you for the information Andreas. Now I have several options to
handle my situation.

Best regards,
Patricio.

"Andreas Mueller" <me@privacy.net> wrote in message
news:43*************@individual.net...
Patricio wrote:
Thank you Nicholas and Terry for the information.

From what I read in the links it seems that I need to attach a debugger
to the running application to create the full user dumps.


You can also use userdump.exe or Dr. Watson to create dumps. userdump
works good from an "unhandled exception handler".

In the C++ scenario it seems that the same application can implement a
handler to generate the dump, but it seems that this is not possible with C#, isn't?


It is, you can hook events for that:
Application.ThreadException
AppDomain.UnhandledException

One more question: in a scenario where a unmanaged C++ application uses a managed C++ dll which itself uses a C# dll, will a full dump generated by the unmanaged C++ application (triggered by a C# dll exception) contain
information to debug the C# dll?


It should be accessible via SOS.

Thank you in advance for your answers,
Patricio.


HTH,
Andy
--
To email me directly, please remove the *NO*SPAM* parts below:
*NO*SPAM*xmen40@*NO*SPAM*gmx.net



Jan 24 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by I_AM_DON_AND_YOU? | last post: by
10 posts views Thread by Zack Sessions | last post: by
5 posts views Thread by Chris Stankevitz | last post: by
37 posts views Thread by Steven Bethard | last post: by
18 posts views Thread by Steven Bethard | last post: by
5 posts views Thread by Michael | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.