温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

《CLR Via C#》Visual Studio编译之后的.pdb文件

发布时间:2020-07-12 19:07:40 来源:网络 阅读:772 作者:lsieun 栏目:编程语言

在用Visual Studio新建项目之后,进行编译,总会发现.pdb文件:

《CLR Via C#》Visual Studio编译之后的.pdb文件

在CLR Via C#中讲到,.pdb文件是用来调试用的。pdb是Program Database的简写,它能够进行source code和IL之间的映射。


The compiler produces a Program Database (PDB) file only if you specify the /debug(+/full/pdbonly) switch. The PDB file helps the debugger find local variables and map the IL instructions to source code.【这是IL和Source Code之间的映射】 The /debug:full switch tells the JIT compiler that you intend to debug the assembly, and the JIT compiler will track what native code came from each IL instruction【这是IL和native code之间的映射】. This allows you to use the just-in-time debugger feature of Visual Studio to connect a debugger to an already-running process and debug the code easily【/debug:full提供的功能,是不是指“附加到进程”呢?】. Without the /debug:full switch, the JIT compiler does not, by default, track the IL to native code information, which makes the JIT compiler run a little faster and also uses a little less memory. If you start a process with the Visual Studio debugger, it forces the JIT compiler to track the IL to native code information (regardless of the /debug switch) unless you turn off the Suppress JIT Optimization On Module Load (Managed Only) option in Visual Studio.


When you create a new C# project in Visual Studio, the Debug configuration of the project has /optimize-- and /debug:full switches, and the Release configuration has /optimize+ and /debug:pdbonly switches specified.【在Visual Studio中Debug和Release两个选项,对这两个参数的影响】



向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI