I can see line numbers in my error logs in our development environment, in which the components of VB.NET 2005 and ASP.NET are compiled in debug mode, while the PDB files are copied to the server during deployment.
I don’t see line numbers in production, where things are compiled in release mode, and PDB files do not seem to be created or expanded? Can anyone explain a way to compile and release ready-made components that show the line number in the stack trace? Debugging code that works in dev below:
st = New StackTrace(err, True)
For i As Integer = 0 To st.FrameCount - 1
Dim sf As StackFrame = st.GetFrame(i)
system.diagnostics.debug.print sf.GetFileLineNumber
Next i
source
share