C# Debugging – Reporting Bugs with Stacktrace and Character Limit

algorithmscdebuggingexceptionsstacktrace

I'm developing an xbox indie game and as a last-resort I have a try...catch encompassing everything.

At this point if an exception is raised I can get the user to send me a message through the xbox however the limit is 250 characters.

How can I get the most value out of my 250 characters?

I don't want to do any encoding / compressing at least initially.
Any solution to this problem could be compressed if needed as a second step anyway.

I'm thinking of doing things like turning this:

at EasyStorage.SaveDevice.VerifyIsReady()
at EasyStorage.SaveDevice.Save(String containerName, String fileName)

into this (drop the repeated namespace/class and method parameter names):

at EasyStorage.SaveDevice.VerifyIsReady()
at ..Save(String, String)

Or maybe even just including the inner-most method, then only line numbers up the stack etc.


TL;DR: Given an exception with a stacktrace how would you get the most useful debugging infromation out of 250 characters?

(It will be a .net exception/stacktrace)

Best Answer

You can probably reduce the size a bit more if you consider the difference between framework and user code - when an exception occurs deep in the framework code, you get a long stack trace but all you actually care about is the first line with the actual error, and the line about halfway down where your own code calls the framework code.

Related Topic