How to generate PDB's for .net managed projects in release mode?

孤人 提交于 2019-11-30 07:15:48

In VS2008, you can set the property using the project properties -> Build -> Advanced... -> Debug Info.

In DEBUG:

<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>

In RELEASE:

<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>

I found this MONO request that may shed some light on what's the difference between 'full' and 'pdbonly'.

csc has a "pdbonly" debugtype that generates pdbs, while producing runtime code, i.e. optimised, no debugger attributes, etc.

This is important for being able to obtain useful stack traces from release-quality code.

It seems to me that the existance of the 2 tags (DebugSymbols and DebugType) is redundant.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!