Solved

Local Variable name/value dump

Posted on 2007-11-14
7
301 Views
Last Modified: 2013-12-17
I'd like a system dump upon exception of all local variables (names and values) at the time of the crash. I wonder. This may require reflection, at which I am clueless.  
Any ideas?
0
Comment
Question by:andremara
  • 4
  • 3
7 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 20285071
What you probably want is to use a minidump (this is the standard way of doing this)

http://www.codeproject.com/debug/postmortemdebug_standalone1.asp?df=100&forumid=3419&exp=0&fr=26 includes examples ...

Cheers,

Greg
0
 

Author Comment

by:andremara
ID: 20285158
THAT is really wild stuff Greg.  I'm gonna have to read it a few times, but I think I'll use symbol server as well - to make the symbol load go smoother.  The question here is, (and maybe this is due to the brief example), does this thing display variable names and values as well?  The example only shows a call stack, which I already have with Environment.StackTrace.
Thanks
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 250 total points
ID: 20285620
It is a full memory dump of your application .... you can inspect threads, look at memory/locals, etc etc.

Doing with .NET you will want to look up a tool called SOS (Son of Strike) as well...

http://msdn.microsoft.com/msdnmag/issues/03/06/Bugslayer/ and http://msdn.microsoft.com/msdnmag/issues/05/05/JITCompiler/default.aspx?side=true are worth reading (as is the whole bugslayer series which are generally by John Robbins). This is a huge topic ... so huge in fact that John has about a 1000 page book on the subject http://www.amazon.com/Debugging-Applications-Microsoft-Windows-Pro-Developer/dp/0735615365/ref=sr_1_13?ie=UTF8&s=books&qid=1195087368&sr=1-13 and http://www.amazon.com/Debugging-Microsoft-NET-2-0-Applications/dp/0735622027


Cheers,

Greg
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:andremara
ID: 20285652
Dude, your are a veritable encyclopedia!  Thanks.
Andre
0
 

Author Closing Comment

by:andremara
ID: 31409252
over and beyond my expectations!
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 20285658
in particular in http://msdn.microsoft.com/msdnmag/issues/03/06/Bugslayer/ look at Figure 2 (the output from !CLRStack, it shows you locals + parameters)
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 20285664
Also if you like I have a presentation on this stuff from 2 years ago or so that I could email you the slides... just drop me a line this name@this site ...

Cheers,

Greg
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question