As part of some error handling in our product, we\'d like to dump some stack trace information. However, we experience that many users will simply take a screenshot of the e
Here is the code I use to do this without an exception
public static void LogStack()
{
var trace = new System.Diagnostics.StackTrace();
foreach (var frame in trace.GetFrames())
{
var method = frame.GetMethod();
if (method.Name.Equals("LogStack")) continue;
Log.Debug(string.Format("{0}::{1}",
method.ReflectedType != null ? method.ReflectedType.Name : string.Empty,
method.Name));
}
}