您好,登錄后才能下訂單哦!
在用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兩個選項,對這兩個參數的影響】
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。