I have a VB.NET 2010 Winforms application where I\'d like to include line numbers in the stack trace. I\'ve read the following question and answers:
how to print out
From the documentation of the constructor you're calling:
The StackTrace is created with the caller's current thread, and does not contain file name, line number, or column information.
Try using:
Dim st As StackTrace = New StackTrace(ex, True)
instead, which uses this constructor. The second constructor parameter is described as:
true to capture the file name, line number, and column number; otherwise, false.