views:

30

answers:

3

I'm writing a little developer tool which will (among other things) display exceptions thrown from the code that the tool is currently inspecting. Since it is a developer tool I would like to display as much information about the exception as possible (at the least type, message, stack trace and a recursive InnerException) and do it in a way that is easy to comprehend and analyze.

Unfortunately I cannot think of a nice UI for this. Are there any good examples out there? I have access to DevExpress components if that helps.

A: 

Whatever you do, make sure that the developer can copy and paste all the relevant information!

Benjol
Yes, that too is important.
Vilx-
+1  A: 

Well the Visual Studio one does a fair job! I can't seem to upload an image from this PC, but there's an image here if you haven't seen it.

Everything shown in a dynamic table/tree-like structure, you can drill down into inner exceptions etc, everything is copyable, and there are expandable viewers for certain things (e.g. stack traces). Not pretty, but functional.

Grant Crofton
Since it is a .NET/Winforms application, I'm pretty familiar with VS approach to the problem. Though I believe it could be better, so I've created this question. However I will consider this (or some slight alteration of it) as well, if nothing better comes up.
Vilx-
+2  A: 

Starting with the VS display, I'd look for:

  • omit null values (such as HelpLink == null, or InnerException==null)
  • Don't nest InnerException, it's basically a stack so represent it as such
  • In StackTrace, you could make the file name clickable (or at least easy to pick out and copy).
  • In StackTrace, Emphasizing the actual class and function name to make it stick out from the full namespace and signature garble.
  • Some more data reduction is possible, e.g. exception type displayed twice, but this takes careful handling not to swallow information either

You could consider a HTML view, either making it interactive by catching clicks, or using javascript.

peterchen
Hmm... you echo my thoughts about the HTML view. I think I'll try that. The highlighting part will be tricky though as I'll have to parse the string.
Vilx-
I'm sold. HTML view is far better suited for this task. I think I'll be able to come up with a decent view myself.
Vilx-