Process dump for later debugging

G

Guest

Hi everybody.
We are currently discussing the possibilities in our company, how to
optimize the customer support for lots of our business customers. Since our
new software products are based aproximatly by 80% on the dotNet-Framework,
this seems to be the starting point.

I was thinking about dumping a process in some state (the state at which
some hard trackable error occurs) and sending this dump file to our support
team for debugging reasons, but coud not find any functions/methods in the
documentation to accomplish this.

So my question would be:
Is there a way to dump a .net based process at some state, for later
debugging? And if there is, where would be the starting point to read about
it - and - is there a way to load this file into a debugger, not connected to
the machine where the dump file was generated?

I remember the good old days in C/C++, where this was possible but after
some research around the web, I did not find any answers for archiving this
in C#.
 
M

Michael Nemtsev [MVP]

Hello Laurents C. R. Meyer,

have never tried to creage dump files dynamically, but I consider your need
to start googling for "Mdbg API"
and read the Mike Stall's blog (he is the debugger man at MS)

http://blogs.msdn.com/jmstall/archive/2004/10/05/237954.aspx


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


L> Hi everybody.
L> We are currently discussing the possibilities in our company, how to
L> optimize the customer support for lots of our business customers.
L> Since our
L> new software products are based aproximatly by 80% on the
L> dotNet-Framework,
L> this seems to be the starting point.
L> I was thinking about dumping a process in some state (the state at
L> which some hard trackable error occurs) and sending this dump file to
L> our support team for debugging reasons, but coud not find any
L> functions/methods in the documentation to accomplish this.
L>
L> So my question would be:
L> Is there a way to dump a .net based process at some state, for later
L> debugging? And if there is, where would be the starting point to read
L> about
L> it - and - is there a way to load this file into a debugger, not
L> connected to
L> the machine where the dump file was generated?
L> I remember the good old days in C/C++, where this was possible but
L> after some research around the web, I did not find any answers for
L> archiving this in C#.
L>
 
A

Adam Benson

It's all very basic at the moment. I've used post mortem debugging on C++
apps and C# apps and what you have with C# apps is a retrograde step IMHO.
Having said that, I suppose we should be grateful that it's at least
possible albeit command line only.

Your users will have to install Debugging tools for windows
(http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx)
cdb will produce a process dump, and so you could just provide your users
with a batch command which invokes cdb. Something like this (assuming the
debug tools are installed to c:\Program Files\DbgTools):

"c:\Program Files\DbgTools\cdb.exe" -pv -pn MyApp.exe -c ".dump /ma /u
Snapshot.dmp;q"

If you want to provide the user with a menu option to dump the app's state
then you could just use C# code to create a new cmd instance and invoke cdb
that way.
I'd suggest that's easier than trying to programmatically create a dump file
from within your own app.

HTH,

Adam.
=======
 
G

Guest

This solution should be enough, I think. Since they are business customers,
they do not expect something beautiful, but something that works.

Thanks for the answers. Seems to be exactly what I was looking for!
 

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

Top