473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Generating dump files

Hello,
Is it possible to generate dump file at some execution point in managed
application? I would like to be able to gather information about
exceptions and their context from users running my app - if I handle
some relevant exception, besides informing user of failure, I'd like to
enable him to send me dump file in order to analyze what actually went
wrong and perform some maintenance/debugging on my own. It would be
also nice if I could generate dump post-mortem - when application
crashes due to unhandleld exception. Do you have any ideas or
guidelines concerning this issue?

Apr 20 '06 #1
4 1700
Simply create a text file using a StreamWriter object and call it's
Writeline() mthod using the trapped exception:

<object>.Writeline(<exception>.ToString());

The ToString() method of a class derived from System.Exception, by default
includes a stack trace.

If the executable is a 'debug' build, the stack trace also includes the
source file and line number.

Any other information you wish to include in the 'dump' is purely up to you.

"Marcin Rzeznicki" <ma**************@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
Hello,
Is it possible to generate dump file at some execution point in managed
application? I would like to be able to gather information about
exceptions and their context from users running my app - if I handle
some relevant exception, besides informing user of failure, I'd like to
enable him to send me dump file in order to analyze what actually went
wrong and perform some maintenance/debugging on my own. It would be
also nice if I could generate dump post-mortem - when application
crashes due to unhandleld exception. Do you have any ideas or
guidelines concerning this issue?

Apr 21 '06 #2
Sounds like you want something more hardcore than ex.ToString()

An article on how to get memory dumps from asp.net that really helped me is:
http://blogs.msdn.com/tess/archive/2...11/511773.aspx
(this is a fantastic blog by the way)

Other useful resources:
Mini Dump Snapshots and the New SOS
http://msdn.microsoft.com/msdnmag/is.../03/Bugslayer/

Production Debugging for .NET Framework Applications

http://msdn.microsoft.com/library/de...ml/DBGch01.asp
Hope that helps

"Marcin Rzeznicki" wrote:
Hello,
Is it possible to generate dump file at some execution point in managed
application? I would like to be able to gather information about
exceptions and their context from users running my app - if I handle
some relevant exception, besides informing user of failure, I'd like to
enable him to send me dump file in order to analyze what actually went
wrong and perform some maintenance/debugging on my own. It would be
also nice if I could generate dump post-mortem - when application
crashes due to unhandleld exception. Do you have any ideas or
guidelines concerning this issue?

Apr 21 '06 #3

Chris Mohan napisal(a):
Sounds like you want something more hardcore than ex.ToString()

An article on how to get memory dumps from asp.net that really helped me is:
http://blogs.msdn.com/tess/archive/2...11/511773.aspx
(this is a fantastic blog by the way)

Other useful resources:
Mini Dump Snapshots and the New SOS
http://msdn.microsoft.com/msdnmag/is.../03/Bugslayer/

Production Debugging for .NET Framework Applications

http://msdn.microsoft.com/library/de...ml/DBGch01.asp


Hello,
Thank you very much for help - I'm going to experiment with tools
described in these links.

Apr 21 '06 #4

Stephany Young napisal(a):
Simply create a text file using a StreamWriter object and call it's
Writeline() mthod using the trapped exception:

<object>.Writeline(<exception>.ToString());

The ToString() method of a class derived from System.Exception, by default
includes a stack trace.

If the executable is a 'debug' build, the stack trace also includes the
source file and line number.

Any other information you wish to include in the 'dump' is purely up to you.


Hello,
Sure it's up to me, but using this oversimplified technique I won't be
able to check actual arguments of method causing exception, examine
objects on heap and so on. What I need is something acting like Mozilla
Talkback, which activates itself when application crashes and dumps
process memory sending it to developers for further examination.

Apr 21 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Guenter Walser | last post by:
Hello, When using the codeline: pickle.dump(self, file, pickle.HIGHEST_PROTOCOL) my program runs perfectly fine: --------------------------- Testprotocol -----------------------------
0
by: Dan Gass | last post by:
The difflib.py module and the diff.py tools script in Python 2.4 alpha 3 now support generating side by side (with intra line differences) in HTML format. I have found this useful for performing...
2
by: Jason Gyetko | last post by:
I have a bunch of old *.000 files in the \SQLLIB\DB2 directory. Those are just dump files that I can get rid of with no effect to the system, right?
9
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
2
by: Auddog | last post by:
Hello all, I'm fairly new to access database(s), but I work a lot with mysql. I was wondering if there is a script file out there that I can get a hold of that will create a dump file. I need...
3
by: Noman Ali | last post by:
Hi, It seems that ASP .NET 2.0 does not support XML documentation feature. Is there any way to do this? I serached alot and only find this solution but it didnot works for C#. Here it is. ...
2
by: chenert | last post by:
Hi all, im beginner to restoring dump files and postgresql as well so hope u could bear with me.! :D i have these dump files and i've been working on restoring everything in it. i've tried...
7
by: Nathan Sokalski | last post by:
I am an ASP.NET developer, and Visual Studio 2005 seems to have stopped declaring the controls that I add in the *.designer.vb files, therefore forcing me to manually add them before I can use them...
1
by: Nathan Sokalski | last post by:
Visual Studio 2005 recently stopped generating the *.designer.vb files for my *.aspx and *.ascx files. I am using Service Pack 1, and do not believe I did anything differently than normal prior to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.