Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

Local Variable name/value dump

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
andremara
Asked:
andremara
  • 4
  • 3
1 Solution
 
gregoryyoungCommented:
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
 
andremaraAuthor Commented:
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
 
gregoryyoungCommented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
andremaraAuthor Commented:
Dude, your are a veritable encyclopedia!  Thanks.
Andre
0
 
andremaraAuthor Commented:
over and beyond my expectations!
0
 
gregoryyoungCommented:
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
 
gregoryyoungCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now