Reputation: 33525
I'm compiling a C# program by running the compiler directly from the command line, csc foo.cs bar.cs
. When the resulting program throws an exception at runtime, the stack trace does still contain method names, but doesn't contain line numbers.
How do you get the stack trace to contain line numbers again?
Upvotes: 0
Views: 84
Reputation: 35135
I believe you need to deploy the pdb file alongside the library(ies).
More information in the following article https://msdn.microsoft.com/en-us/library/ee416588(v=vs.85).aspx
By default, PDB files contain the following information:
- Public symbols (typically all functions, static and global variables)
- A list of object files that are responsible for sections of code in the executable
- Frame pointer optimization information (FPO)
- Name and type information for local variables and data structures
- Source file and line number information
Upvotes: 1