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

前端 未结 3 452
北恋
北恋 2020-12-30 11:20

I know PDBs are generated for managed projects in .NET by giving the compiler the /debug argument. Is there a way to specify this in the VS (2005) GUI?

The

相关标签:
3条回答
  • 2020-12-30 11:50

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

    0 讨论(0)
  • In DEBUG:

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

    In RELEASE:

    <DebugSymbols>true</DebugSymbols>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    
    0 讨论(0)
  • 2020-12-30 12:13

    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.

    0 讨论(0)
提交回复
热议问题