For application crashes/exceptions, just let Watson do its job:
http://social.technet.microsoft.com/wiki/contents/articles/8103.application-crash-dump-analysis-windows-7.aspx.
You can get very useful crash dumps that Visual Studio lets you debug into and
inspect variables, objects, etc similar to normal debugging.
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On
Behalf Of Andrew McGrath
Sent: Tuesday, May 20, 2014 6:19 PM
To: ozDotNet
Subject: re: debugging object
Not exactly sure what you are looking for in terms of a nuget package but I do
the following:
In the exception handler I call my own Debug.ReportException method to which I
would pass the properties of the interesting object as Liststring, then I
include the stack trace by calling this code:
public Liststring StackTraceToString()
{
Liststring sb = new Liststring();
var frames = new System.Diagnostics.StackTrace(true).GetFrames();
for (int i = 1; i frames.Length; i++) /* Ignore current
StackTraceToString method...*/
{
var currFrame = frames[i];
var method = currFrame.GetMethod();
sb.Add(string.Format({0}:{1},
method.ReflectedType != null ? method.ReflectedType.Name :
string.Empty,
method.Name + Line: + currFrame.GetFileLineNumber()));
}
return sb;
}
and finally everything via an email to myself - the email being generated via
SQL Server via script I found on the web.
You probably want to add a utility routine to generically grab all the object
properties as Liststring and then could pick which object to interrogate as
part of your exception handler.
Andrew
From: anthonyatsmall...@mail.commailto:anthonyatsmall...@mail.com
Sent: Wednesday, May 21, 2014 10:32 AM
To: ozdotnet@ozdotnet.commailto:ozdotnet@ozdotnet.com
Subject: debugging object
Anyone aware or use any tools to debug code at object level. Want to be
able to out an object and its property values so i can get more info when an
exception occurs in my winforms app? Maybe a nugget package?
Anthony Salerno | Founder | SmallBiz Australia
Innovation | Web | Software | Developers | Support
+613 8400 4191 | 2Anthony (at) smallbiz.com.au | Po Box 135, Lower Plenty
3093 ABN : 16 079 706 737
www.smallbiz.com.auhttp://www.smallbiz.com.au http://www.smallbiz.com.au/ |
www.linkedin.com/in/innovativetechnologyhttp://www.linkedin.com/in/innovativetechnology