The java. lang. StackTraceElement. getLineNumber() method returns the line number of the source line containing the execution point represented by this stack trace element.
The first line represents the function call where the error occurred. As we can see, the getTitle function of the Book class is the last executed call.
a call stack is a stack data structure that stores information about the active subroutines of a computer program. A stack trace is a report of the active stack frames at a certain point in time during the execution of a program.
In VS2012 you need to uncheck "Exclude generated debug symbols" in the Package/Publish Web section of the properties as well.
My solution
Copy pdb file in same folder that executable file.
now i can view the line number when run the exe file.
this is reason
http://msdn.microsoft.com/en-us/library/ee416588%28v=vs.85%29.aspx
I've run into problems in the past where I feel the need to deploy PDB files with a release build in order to track down an error. The reason is, like you said, was that the exception occurred in a method that was very large and I could not accurately pinpoint where it was happening.
This might be an indication that the method needs to be refactored into smaller, more granular methods. Not a one size fits all answer, but this approach has served me well in the short term (I've often found the bug during the refactoring) and in the long run.
Just a thought.
Include debug symbols with your build/deployment package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With