VB.NET and ASP.NET DLL line numbers don't appear in production error logs

I can see line numbers in my error logs in our development environment, in which VB.NET 2005 and ASP.NET components are compiled in debug mode, with PDB files copied to the server on deployment.

I don't see line numbers in production, where things are compiled in release mode, and presumably no PDB files are created or deployed? Can someone explain a way to compile and release production-ready components that show the line number in a stack trace? Debug 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


Take a look at this article. Basically you need to configure your project to still output PDBs even when running in release mode.

Need Your Help

How to change form id attribute in symfony2 using php templates?

php html forms symfony

I have multiple forms in my php template, and I want to give different ids to them so they can be submited using js. how could I do that as I can't find nothing for php templates?