zoukankan      html  css  js  c++  java
  • debug net framework source codes [detail]

    Using the Microsoft Symbol Server to obtain symbol debugging information is now much easier in VS 2010. Microsoft gives you access to their internet symbol server that contains symbol files for most of the .NET framework including the recently announced availability of MVC 2 Symbols. 

    SETUP 

    In VS 2010 RTM, go to Tools –> Options –> Debugging –> General. Check “Enable .NET Framework source stepping” 
    image 
    We get the following dialog box

     image 
    This automatically disables “Enable My Code” 
     image 
    Go to Debugging –> Symbols and Check “Microsoft Symbol Servers”. You can selectively exclude modules if you want to. 
      image 
    You will get a warning dialog like so: 
    image 
    Hitting OK will start the download process 
      image 
    The setup is complete. You are now ready to start debugging!


    DEBUGGING

    Add a break point to your application and run the application in debug mode (F5 shortcut for me). Go to your call stack when you hit the break point. Right click on a frame that is grayed out. 
    image 
    Select “Load Symbols from” “Microsoft Symbol Servers”. VS will begin a one time download of that assembly. This assembly will be cached locally so you don’t have to wait for the download the next time you debug the app. 
    image  
    We get a one time license agreement dialog box 
    image

    You might see an error like the one below regarding different encoding (hopefully will be fixed). 
    image   
    Assemblies for which the symbols have been loaded are no longer grayed out. Double clicking on any entry in the call stack should now directly take you to the source code for that assembly.

    image 

    image

    AFAIK, not all symbols are available on the MS symbol server. In cases like that you will see a tab like the one below and be given the option to “Show Disassembly”.

    image

    Enjoy!

  • 相关阅读:
    英语面试自我介绍范文(二)
    在PHP中PDO解决中文乱码问题的一些补充
    英文面试自我介绍(一)
    添加XP/2003的网络用户和密码及用户自动登录
    Windows Server 2000/2003/2008错误
    数据库连接字符串大全 (转载)
    flash中特殊字符解析的使用
    创建T100Monitor技术研究过程
    LINQ,SQL查询,LINQ 实现常见SQL查询
    Web.Config 的图形配置及配置项含意
  • 原文地址:https://www.cnblogs.com/kingangWang/p/2136474.html
Copyright © 2011-2022 走看看