1.  Project->Properties->Build->Advance,

Debug Info : Full/pdb-only .

set to [none] will not generate pdb file.

2.when new version release , rebuild whole solution , copy all files to server.

 

what's the difference between C# compilation setting “/debug:pdbonly” and “/debug:full”?

The main difference is about performance.

Be aware that when you create a new project in Visual Studio, the Default configuration (/optimized- and /debug:full) ,produce unoptimized code. So the C # compiler will emit NOP (no-operation) instructions into the code. (The NOP instructions are emitted for example to enabled the “edit and continue” feature while debugging, or to allow breakpoints to be set on control flow instructions such as for, while, do, if , else, try, catch and finally ) impacting directly on the speed and size of the JIT optimized code.

On the other hand, In managed environment (.NET), compiling the code is accomplished in two phases. First, the compiler passes over the source code producing IL. Then, at run time the IL must be compiled into native CPU instructions requiring more memory to be allocated and requiring additional CPU time to do the work (JIT). So having an optimized IL code quality and an optimized JIT Native code quality by setting /optimized+ and /debug:pdbonly (default configuration for compilations if Release is chosen) could improve the performance of the application.

Moral of a fable, always compile in release mode when deliver your apps to the end users and you could gain a bit of performance.

 

 

Should I compile release builds with debug info as “full” or “pdb-only”?

I would build with pdb-only. You will not be able to attach a debugger to the released product, but if you get a crash dump, you can use Visual Studio or WinDBG to examine the stack traces and memory dumps at the time of the crash.

If you go with full rather than pdb-only, you'll get the same benefits, except that the executable can be attached directly to a debugger. You'll need to determine if this is reasonable given your product & customers.

Be sure to save the PDB files somewhere so that you can reference them when a crash report comes in. If you can set up a symbol server to store those debugging symbols, so much the better.

If you opt to build with none, you will have no recourse when there's a crash in the field. You won't be able to do any sort of after-the-fact examination of the crash, which could severely hamper your ability to track down the problem.

A note about performance:

Both John Robbins and Eric Lippert have written blog posts about the /debug flag, and they both indicate that this setting has zero performance impact. There is a separate /optimize flag which dictates whether the compiler should perform optimizations.

 

/debug (C# Compiler Options)

One difference between /debug:pdbonly and /debug:full is that with /debug:full the compiler emits a DebuggableAttribute, which is used to tell the JIT compiler that debug information is available. Therefore, you will get an error if your code contains the DebuggableAttribute set to false if you use /debug:full.

C# dmp debug, can't load pdb file的更多相关文章

  1. vs2010调试程序出现“Cannot find or open the PDB file”

    项目中源程序编写好以后, (一个简单的小程序) #include int main(void) { int age; int day; age = 24; printf("tom is %d ...

  2. Cannot find or open the PDB file问题的解决

    'testcv.exe' (Win32): Loaded 'D:\Documents\Visual Studio 2013\Projects\testcv\x64\Debug\testcv.exe'. ...

  3. 解决Cannot find or open the PDB file问题

    今天使用opencv里的mat想要保存数据里边的像素的平均值和标准差: 但是编程好了之后会出现下面的问题,不能找到pdb file .下面将提供三种解决方法以及产生问题的原因. 程序也运行不出来,整个 ...

  4. cannot load such file -- openssl

    [test@localhost usr]$ /usr/local/ruby/bin/gem install bundler ERROR: Loading command: install (LoadE ...

  5. Python load json file with UTF-8 BOM header - Stack Overflow

    Python load json file with UTF-8 BOM header - Stack Overflow 3 down vote Since json.load(stream) use ...

  6. fatal error C1083: Cannot open precompiled header file: 'Debug/xxoo.pch': No such file or directory

    fatal error C1083: Cannot open precompiled header file: 'Debug/xxoo.pch': No such file or directory ...

  7. require './ex25' can't load such file

    require './ex25' can't load such file 在练习learn ruby the hard way时候,第25题,发生了一下错误 LoadError: cannot lo ...

  8. bundle install 安装的 gem 提示 cannot load such file

    /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load ...

  9. redis-trib.rb报错:/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- redis (LoadError)

    报错如下: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- redis ...

随机推荐

  1. 为什么页面设计宽度要控制在960px

    其实这里涉及到了一个网页栅格系统的问题,而且这个观念是从苹果的设计师那里来的 网站 首页页面宽度 px Yahoo! 950 淘宝 950 MySpace 960 新浪 950 网易 960 Live ...

  2. C语言 · 递归倒置字符数组

    算法提高 递归倒置字符数组   时间限制:1.0s   内存限制:512.0MB      问题描述 完成一个递归程序,倒置字符数组.并打印实现过程 递归逻辑为: 当字符长度等于1时,直接返回 否则, ...

  3. idea properties文件unicode码问题

    在git hub上下载了个工程.但是properties文件一直显示不了中文: # \u662F\u5426\u4F7F\u7528\u8FDC\u7A0B\u914D\u7F6E\u6587\u4E ...

  4. java transient关键字作用,使用场景。

    java transient关键字作用,使用场景. 2016年08月31日 15:31:10 阅读数:4280 transient的作用及使用方法,官方解释为: Variables may be ma ...

  5. Ubuntu 16.04 标题栏实时显示上下行网速、CPU及内存使用率

    有时感觉网络失去响应,就通过Ubuntu 14.04自带的系统监视器程序来查看当前网速,但是这样很不方便,遂打算让网速显示在标题栏,那样就随时可直观的看到.一番搜索尝试后,成功实现!同时也实现了CPU ...

  6. 自然语言交流系统 phxnet团队 创新实训 项目博客 (四)

    刚开始做时,一点头绪都没有,整天的上网找资料,各种谷歌百度,各种博客论坛,搜索的关键词也无非是智能自然语言交流.智能机器人.中文问答系统等等等等.而我们的思路也是些零散的,例如我们知道会用到分词,会用 ...

  7. 【CUDA学习】__syncthreads的理解

    __syncthreads()是cuda的内建函数,用于块内线程通信. __syncthreads() is you garden variety thread barrier. Any thread ...

  8. C/C++ 查看数组类型长短 , python的len的封装原理

    sizeof什么时间加括号什么时候不加括号? sizeof当用应用于一个表达式的时候不需要圆括号: 例如 sizeof  i; 如果运算符优先的时候需要: 例如sizeof(i+j); 方法一. in ...

  9. SSH远程启动tomcat后,退出SSH,tomcat也退出

    在原本的启动命令 ./catalina.sh start前面加上nohup,即nohup ./catalina.sh start其中,nohup 是linux命令,不挂断运行,具体如下:语法:nohu ...

  10. Maven 构建配置文件

    什么是构建配置文件? 生成配置文件是一组可以用来设置或覆盖 Maven 构建配置值的默认值.使用生成配置文件,你可以针对不同的环境,如:生产V/S开发环境自定义构建. 配置文件中指定 pom.xml ...