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. PHP中路径的相关配置

    1. get_include_path() 取得当前的环境变量,即php.ini里设置的 include_path; set_include_path() 是设置include的路径,通过此设置后可以 ...

  2. 【计算机网络基础】TCP/IP、HTTP、Socket的概念

    TCP/IP协议是一个协议簇.里面包括很多协议的.UDP也是其中的一个.之所以命名为TCP/IP协议,因为TCP,IP协议是两个很重要的协议,就用他两命名了.(资料来源: http://www.cnb ...

  3. CAS (14) —— CAS 更多用户信息

    CAS (14) -- CAS 更多用户信息 摘要 将更多用户信息写入到service验证返回消息中 版本 tomcat版本: tomcat-8.0.29 jdk版本: jdk1.8.0_65 cas ...

  4. Java8中list转map

    第一种: 取list中某2个字段作为Map的K,V public Map<Long, String> getIdNameMap(List<Account> accounts) ...

  5. 百度地图Api进阶教程-实例高级操作8.html

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  6. 最近玩Bootstrap , 一些小工具 记录在案。

    最近玩Bootstrap , 一些小工具 记录在案. 1 定制Bootstrap ,所见即所得的修改Bootstrap的各种变量,即时查看样式的变化. http://bootswatchr.com/ ...

  7. 关于安装black apple遇到的坑

    1.用料准备: vmware player或vmware workstation,osx系统安装包(后缀名为cdr的几个G大小的文件),为vmware安装osx的补丁安装包unlocker 2.在安装 ...

  8. php时间段判断

    <?php function times(){ ini_set('date.timezone','Asia/Shanghai'); $time = date("Y-m-d H:i&qu ...

  9. (笔记)Linux下的CGI和BOA使用期间遇到的问题汇总

    前段时间在做C/S模式下的视频监控,这段时间是B/S模式下的.期间遇到了不少问题,有些问题一卡就是几天,有些问题的解决办法在办法在网上也不是很好找,所以还有些问题虽然得到了临时解决,但是其原理现在我本 ...

  10. SpringMVC系列(十二)自定义拦截器

    Spring MVC也可以使用拦截器对请求进行拦截处理,用户可以自定义拦截器来实现特定的功能,自定义的拦截器必须实现HandlerInterceptor接口– preHandle():这个方法在业务处 ...