c# get full stack trace from exception code example Example: c# print exception stack trace System.Diagnostics.Debug.WriteLine(e.StackTrace.ToString());