Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line Numbers

Status
Not open for further replies.

robertfah

Programmer
Mar 20, 2006
380
US
I'm trying to publish my website so when there's an error, the site will show the line number in the stack trace. The weird part is, when my coworker publishes to the web server, we are able to see the line numbers...but when I publish to the same server, they don't show up.

We are using the same files (via Source Safe) so all our publishing files are identical. We are also both using vs2008

Any ideas?
 
try this
Code:
System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace(true);
foreach (System.Diagnostics.StackFrame sf in st.GetFrames())
{
     Console.WriteLine(sf.GetMethod() + " " + sf.GetFileLineNumber() + " " + sf.GetFileColumnNumber());
}
st = null;
 
Hey Robertfah, just curious, did my example get what you where looking for?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top