Debug information?
My "query" is throwing an exception and stacktrace. It would be nice if the stacktrace included line numbers. In the past I have included a .PDB file and the line numbers appear in the stack. Is it possible to include a PDB and have LINQPad use it when generating a stacktrace? If so where would I copy it?
Comments
If so, LINQPad does not copy over the PDB files to avoid the I/O overhead. However, there are a couple of workarounds.
The first is to explicitly add a reference to the .PDB file (as well as the .DLL).
The second is to go to Edit | Preferences | Advanced and set "Do not shadow assembly references" to true, and re-start LINQPad. This will stop LINQPad from copying files altogether, although it may lock the files that you reference.
1) Right click the .NET project, Properties
2) Select Build tab
3) Click Advanced button
4) Change Debugging Information drop-down from Portable to Full
5) Rebuild the solution
It looks like this action adds the following lines to the .csproj file:
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup>
Once that was done, I see line numbers next to each file in the StackTrace!