In addition to informing the user, we want to collect information for our debugging purposes. Our system is a niche system for only about 1400 customers, and therefore we are not as well-financed as we would hope, so bugs are more common than we would like. We currently have a window that shows the first line of the error message in larger print with a yellow background to draw the user's eye, with the scary part in a textbox below it with a gray background. There is also a button that will put all of it in the copy buffer for sending to customer support. The message that we're trying to go to consists of the exception.Message, the last five parts of the stack trace, and the name of the method that caused the error (Reflection.MethodBase). We are planning to add the ability for the user to say what he was doing at the time, and maybe a radio button indicating how often this happens, and write it to a log file. What other other useful information should we include?
We are also considering emailing it to customer support but not stressing if the email fails. There are other considerations with the email - customer support might drown in it, users might object because we'd be sending system info as well, etc.
I found two similar questions on SO, but they aren't really focussed on what I'm interested in. http://stackoverflow.com/questions/117083/error-message-text-best-practices deals with how to make useful messages for the user, and http://stackoverflow.com/questions/116542/best-way-to-handle-error-messages deals with where to keep error IDs vs error text. I'm more interested in debugging (because unfortunately our system DOES have lots of errors).