Solved

Local Variable name/value dump

Posted on 2007-11-14
7
299 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Web appliction 7 46
Anyway to make "All" the default in the dropdown? 6 34
Data is not showing from images 15 36
Get Client IP on RDS - VB.NET 15 15
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

929 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now