Solved

Local Variable name/value dump

Posted on 2007-11-14
7
303 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

691 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