Environment.StackTrace Property gets current stack trace information.
Imports System Class Sample Public Shared Sub Main() Console.WriteLine("StackTrace: '{0}'", Environment.StackTrace) End Sub 'Main End Class 'Sample