Answered by:
StackTrace incorrect line number

Question
-
User1536465747 posted
Hello Guys,
I have a project with a quite big .pdb file (2 MB)
I get the exceptions on time but with incorrect line number e.g. the exception is thrown on the line #101 while StackTrace reports the line #112
Is there any fix/reset for this? Thank you very much
Wednesday, December 11, 2019 12:12 PM
Answers
-
User475983607 posted
Hello Guys,
I have a project with a quite big .pdb file (2 MB)
I get the exceptions on time but with incorrect line number e.g. the exception is thrown on the line #101 while StackTrace reports the line #112
Is there any fix/reset for this? Thank you very much
It means the .pdb file is not the same version as the dll. Build the project using the debug configuration then deploy the pdb and dll files. The pdb file contains the debugging symbols and generally is not deployed or wanted on the remote server.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, December 11, 2019 12:24 PM -
User753101303 posted
Hi,
AFAIK it can happen that JIT optimization causes the current statement offset to not match any more the original source code line. This is a debug build with no optimization or you try to deploy PDB files as part of your release? (I never really found this that usefull).
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, December 11, 2019 12:38 PM
All replies
-
User475983607 posted
Hello Guys,
I have a project with a quite big .pdb file (2 MB)
I get the exceptions on time but with incorrect line number e.g. the exception is thrown on the line #101 while StackTrace reports the line #112
Is there any fix/reset for this? Thank you very much
It means the .pdb file is not the same version as the dll. Build the project using the debug configuration then deploy the pdb and dll files. The pdb file contains the debugging symbols and generally is not deployed or wanted on the remote server.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, December 11, 2019 12:24 PM -
User753101303 posted
Hi,
AFAIK it can happen that JIT optimization causes the current statement offset to not match any more the original source code line. This is a debug build with no optimization or you try to deploy PDB files as part of your release? (I never really found this that usefull).
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, December 11, 2019 12:38 PM -
User288213138 posted
Hi KulerMaster,
I have a project with a quite big .pdb file (2 MB)
I get the exceptions on time but with incorrect line number e.g. the exception is thrown on the line #101 while StackTrace reports the line #112
Is there any fix/reset for this? Thank you very much
It's might be the APM causing this problem. you can try to deactivat the APM agent.
More information abount wrong line numbers in stack trace you can refer to this link: https://stackoverflow.com/a/38374576
Best regards,
Sam
Thursday, December 12, 2019 2:43 AM