zoukankan      html  css  js  c++  java
  • What is the difference between Debug and Release in Visual Studio?

    “Debug” and “Release” are actually just two labels for a whole slew of settings that can affect your build and debugging.


    In “Debug” mode you usually have the following:

    • Program Debug Database files, which allow you to follow the execution of the program quite closely in the source during run-time.
    • All optimizations turned off, which allows you to inspect the value of variables and trace into functions that might otherwise have been optimized away or in-lined
    • A _DEBUG preprocessor definition that allows you to write code that acts differently in debug mode compared to release, for example to instrument ASSERTs that should only be used while debugging
    • Linking to libraries that have also been compiled with debugging options on, which are usually not deployed to actual customers (for reasons of size and security)

    In “Release” mode optimizations are turned on (though there are multiple options available) and the _DEBUG preprocessor definition is not defined. Usually you will still want to generate the PDB files though, because it’s highly useful to be able to “debug” in release mode when things are running faster.


    Here’s the difference between VCXPROJ context

    RELEASE

    <PropertyGroup>
        <WholeProgramOptimization>true</WholeProgramOptimization>
    
    <ClCompile>
        <Optimization>MaxSpeed</Optimization>
        <FunctionLevelLinking>true</FunctionLevelLinking>
        <IntrinsicFunctions>true</IntrinsicFunctions>
    <Link>
        <EnableCOMDATFolding>true</EnableCOMDATFolding>
        <OptimizeReferences>true</OptimizeReferences>

    DEBUG

    <PropertyGroup>
        <UseDebugLibraries>true</UseDebugLibraries>`
    
    <ClCompile>
        <Optimization>Disabled</Optimization>
    
  • 相关阅读:
    BootStrap行内编辑
    NPOI学习笔记
    仅当使用了列列表并且 IDENTITY_INSERT 为 ON 时,才能为表'Address'中的标识列指
    .Net MVC发布出错 Server Error in '/' Application.
    C# 新特性
    System.Runtime.InteropServices.COMException:“服务器出现意外情况。 (异常来自
    BootStrap的表格加载json数据,并且可以搜索,选择
    NPOI导入导出Excel
    读取Easy UI的DATa grid里面的所有数据
    C# 导出Excel
  • 原文地址:https://www.cnblogs.com/lkpp/p/7399996.html
Copyright © 2011-2022 走看看