Skip to content

Instantly share code, notes, and snippets.

@seiji
Created February 7, 2012 02:13
Show Gist options
  • Save seiji/1756668 to your computer and use it in GitHub Desktop.
Save seiji/1756668 to your computer and use it in GitHub Desktop.
string message = Time.realtimeSinceStartup.ToString() + " : [Elapsed]";
StackFrame CallStack = new StackFrame(1, true);
string SourceFile = CallStack.GetFileName();
int SourceLine = CallStack.GetFileLineNumber();
message += "\n - File: " + SourceFile + " Line: " + SourceLine.ToString();
Debug.Debug(message);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment