I have this code
Public Sub LogError(ByVal TheException As Exception, ByVal LogFile As String)
Dim LnNo As Integer = 0
Dim Prog As String = ""
Dim Proc As String = ""
LnNo = New StackTrace(TheException, 0, True).GetFrame(1).GetFileL
Prog = New StackTrace(TheException, 0, True).GetFrame(1).GetMetho
Proc = New StackTrace(TheException, 0, True).GetFrame(1).GetMetho
LogFile, Now() & " L " & Prog & " - " & Proc & " Ln: " & LnNo & " : " & TheException.Message & vbCrLf, True)
Catch ex As Exception
, "Error In LogError 2") 'Show the user their error not mine
it basically shows me where an error occured. It works great but then I read that the debug information is not available in release mode, which means that if someone else is running the program and gets an error the Line Number will not be shown.
on the following link it tells you how to include dubug info when you build in 2003
I cannot find this option in 2005. So I guess I am looking for an answer that tells me how to do this or another way of showing you what line the error occured when it gets one.
hope this is clear