(3)Use Microsoft’s PDBs to debug or profile external assemblies or libraries

招数3:

使用Microsoft的PDBs调试和分析外部的程序集和库

To accurately debug or profile an external assembly or library (i.e. one you’re not directly compiling), you need the PDB files that accompany each of the DLLs.These files give your debugger or profiler access to information such as function names, line numbers,and other related metadata.
为了精确地调试和分析外部程序集或者库文件(i.e.你没有直接编译),你必须每个DLLs文件都有PDB文件。这些文件给你的调试器和分析器提供了访问比如函数名,行数,和其他本地的元素据。

One thing that sucks in particular is debugging and profiling native Microsoft .NET assemblies without this kind of information. Fortunately, there’s a solution for this very issue. With a little-known feature in Visual Studio 2012 (and 2010 too!), you can connect to Microsoft’s Symbol Servers and obtain most of the debugging symbols for their assemblies and libraries.
一件特别糟糕的事情,在没有这种信息的情况下调试和分析本地的Microsoft .NET 程序集。很幸运,有一种解决方案应对这种非常问题。随着Visual Studio 2012(2010 也一样!)鲜为人知的一种特性,你能连接到Microsft的符号服务器获取到绝大多数的程序集和库文件的调试符号。

Just go to Tools –> Options –> (expand) Debugging –> Symbols, and select the Microsoft Symbol Servers as your source for Symbols.Getting the symbols from Microsoft every time you debug or profile is slow and painful. It’ll even give you a pop-up saying as much once you check the Microsoft Symbol Servers, so be sure to
specify a directory under “Cache symbols in this directory”.
在工具 –> 选项 –> 调试 –> 符号下选择Microsoft 符号服务器作为你的符号源。你调试或者分析每次都要从Microsoft获取符号是很慢而且伤脑筋的事情。一旦你检查Microsft符号服务器,它会给你一个弹层确定是否指定了一个目录用于“缓存符号的目录”。

It will keep a local copy of the PDBs and check for updates every so often. As a result, you get your regular debugging/profiling AND you can see the function names of the Microsoft assemblies.
它会保留一个PDBs的本地备份,经常检查更新。因此你向往常一样调试和分析能看见Microsoft程序集的函数名称。

教你50招提升ASP.NET性能(三):使用Microsoft的PDBs调试和分析外部的程序集和库的更多相关文章

  1. 教你50招提升ASP.NET性能(二十六):对于开发人员的数据库性能技巧

    Database Performance Tips for Developers对于开发人员的数据库性能技巧 As a developer you may or may not need to go ...

  2. 教你50招提升ASP.NET性能(十六):把问题仍给硬件而不是开发人员

    (27)Throw hardware at the problem, not developers 招数27: 把问题仍给硬件而不是开发人员 As developers, we often want ...

  3. 教你50招提升ASP.NET性能(十一):避免在调试模式下运行网站

    (17)Avoid running sites in debug mode 招数17: 避免在调试模式下运行网站 When it comes to ASP.NET, one of the most c ...

  4. 教你50招提升ASP.NET性能(七):总是在服务器端执行验证

    (13)Always perform validation on the server as well 招数13: 总是在服务器端执行验证 This isn’t exactly a performan ...

  5. 教你50招提升ASP.NET性能(二):移除不用的视图引擎

    (2)Remove unused View Engines 招数2: 移除不用的视图引擎 If you're an ASP.NET MVC developer, you might not know ...

  6. 教你50招提升ASP.NET性能(二十四):ORM小窍门

    ORM TipsORM小窍门 More and more people are using Object to Relational Mapping (ORM) tools to jump the d ...

  7. 教你50招提升ASP.NET性能(二十一):避免使用会话状态

    (39)Avoid using session state 招数39: 避免使用会话状态 Where possible, you should try and avoid using session ...

  8. 教你50招提升ASP.NET性能(二十):7条便利的ViewState技巧

    (32)Seven handy ViewState tips 招数32: 7条便利的ViewState技巧 Every time I have to deal with a classic ASP.N ...

  9. 教你50招提升ASP.NET性能(十九):静态集合

    (30)Static collections 招数30: 静态集合 If a collection is static, make sure it only contains the objects ...

随机推荐

  1. ObfuscationAttribute模糊处理

    在Reflection的强大和Reflector的盛行下,.NET产品的内部实现越来越透明,在恶意用户和Cracker面前,基本上已是砧板上的肉,被切到什么程度只能祈祷遇到的都是钝刀子:于是一批批的混 ...

  2. 【HDOJ】3007 Buried memory

    1. 题目描述有n个点,求能覆盖这n个点的半径最小的圆的圆心及半径. 2. 基本思路算法模板http://soft.cs.tsinghua.edu.cn/blog/?q=node/1066定义Di表示 ...

  3. mac tree命令

    mac下默认是没有 tree命令的,不过我们可以使用find命令模拟出tree命令的效果,如显示当前目录的 tree 的命令: $ find . -print | sed -e 's;[^/]*/;| ...

  4. J2EE中你必须了解的13种技术规范

    1)JDBC(Java Database Connectivity): JDBC API为访问不同的数据库提供了一种统一的途径,象ODBC一样,JDBC对开发者屏蔽了一些细节问题,另外,JDCB对数据 ...

  5. CSS那些事儿-阅读随笔2(选择符的组合与优先级/权重)

    在知道了CSS选择符最基础的知识后,就要综合利用它们了.这里就记录几种常见的用法. 1.针对性的使用类选择符或者ID选择符 类选择符在一个页面中可能会在不同的地方应用,那么就需要有针对性地使用类选择符 ...

  6. openSession()和getCureentSession()的区别

    openSession():永远是打开一个新的session getCureentSession():如果当前环境有session,则取得原来已经存在的session,如果没有,则创建一个新的sess ...

  7. 读取Excel任务列表并显示在Outlook日历上

    前几天,公司发了一个任务安排,时间不固定,但要求准时到,为了给自己加一个提醒,也为了回顾一下以前的技术,特做了一个Demo. 读取Excel就不多说了,代码很简单,但支持老版本Excel和的版本Exc ...

  8. erlang判断语法结构:if/case/guard

    erlang 有好几种常用的判断结构语句,如 if.case.guard 等.文章将分别对 if / case /guard 的特点做介绍,以及用例说明 1.if 结构 if Condition 1  ...

  9. JQuery: 微博演示

    演示图: 完成图: 微博演示代码如下: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> ...

  10. [Bhatia.Matrix Analysis.Solutions to Exercises and Problems]ExI.5.3

    Let $\scrM$ be a $p$-dimensional subspace of $\scrH$ and $\scrN$ its orthogonal complement. Choosing ...