Line numbers are not showing in stack traces
This is a .Net 4.0 web application
I have triple checked and the following statements are true:
- pdb files are deployed in the bin dir
- “deployment retail” is not set to true
- “identity impersonate” is not set to true
When I run the app in debug mode on my machine, I can see the error line numbers but not when I publish the application (using a “dev” configuration mode) to a directory and copy it across to the destination location. The custom “dev” configuration mode is similar to the built in “release” configuration mode in visual studio 2010 but with “Output Debug Info” set to “pdb-only”.
Have I missed anything?
Ok got it sorry.
Someone / something had changed the Output path in the build configuration to “bin\Dev\”. When the app is published, all the dlls and pdb files are deployed under /bin as you would expect but the /bin/Dev directory is not deployed.
So the answer is to change the Output path to bin\
Note: as Paolo suggested it’s also important to clear the temporary asp.net files otherwise you still don’t get line numbers.