个人资料

跳过导航链接首页 > 博客列表 > 博客正文

代码编译debug和release的区别

分类:

Debug:


用于帮助调试程序,基本上是你写程序使用的,他不对代码进行任何优化,同时编译debug信息用于调试,这会使你的程序更大更慢,但是更利于调试。这通常是程序默认的编译设置。


Release:


release用于将程序发布给公众,进行体积和性能优化。不包含额外的调试信息。因为release配置包含了所有优化,这个模式对于测试代码性能也很有用,同时代码效果和debug配置可能有所不同。


---------------


The debug configuration is designed to help you debug your program, and is generally the one you will use when writing your programs. This configuration turns off all optimizations, and includes debugging information, which makes your programs larger and slower, but much easier to debug. The debug configuration is usually selected as the active configuration by default. We’ll talk more about debugging techniques in a later lesson.


The release configuration is designed to be used when releasing your program to the public. This version is typically optimized for size and performance, and doesn’t contain the extra debugging information. Because the release configuration includes all optimizations, this mode is also useful for testing the performance of your code (which we’ll show you how to do later in the tutorial series).

songshizhao
最初发表2020/3/13 10:26:00 最近更新2020/3/13 10:27:04 147
为此篇作品打分
10
   评论