. NET Framework sectionSource codeIs open-source. These sourcesCodeFor our learning and reference. You can also debug applications and directly jump into these open-source. NET Framework code. In this way, you can learn the code from MS and debug it yourself. The following is a simple example of WPF.
Create a WPF ApplicationProgramDrag a button and a MessageBox will pop up in the background code.
Private voidButton#click (ObjectSender,RoutedeventargsE ){MessageBox. Show ("Hello word");}
Below I will debug MessageBox. Show ("Hello word"); in this function, see the figure:
Press F11 to enter the messgebox class.
Press F11 To Go To The isvalidmessageboxbutton method:
In this way, you can see the code that you do not usually see.
The following namespace code can be debugged:
System. Activities. Core. Presentation
System. Activities. durableinstancing
System. Activities
System. Activities. Presentation
System. addin. Contract
System. addin
System. Configuration
System. Core
System. Data. datasetextensions
System. Data. entity. Design
System. Data. Entity
System. Data. LINQ
System. Data
System. Data. Services. Client
System. Data. Services. Design
System. Data. Services
System. Data. SQLXML
System. Drawing
System. identitymodel
System. identitymodel. selectors
System. Io. Log
System. Management
System. messaging
System.net
System
System. Printing
System. runtime. durableinstancing
System. runtime. remoting
System. runtime. serialization
System. Security
System. servicemodel. Activation
System. servicemodel. Activities
System. servicemodel. Channels
System. servicemodel. Discovery
System. servicemodel. Routing
System. servicemodel. washosting
System. servicemodel. Web
System. Transactions
System. Web. dynamicdata
System. Web. entity. Design
System. Web. Entity
System. Web. Extensions
System. Web. Mobile
System. Web
System. Web. Routing
System. Web. Services
System. Windows. Forms
System. workflow. Activities
System. workflow. componentmodel
System. workflow. Runtime
System. workflowservices
System. XAML. Hosting
System. xml. LINQ
System. xml
The following describes how to configure Visual Studio 2010 to implement such a debugging function.
First, go to http://referencesource.microsoft.com/netframework.aspxto download the second file:
Then, install it in a directory that you can read and write. I installed it in D: \ refsrc.
Finally, configure Visual Studio 2010.
1. Tools-Option-debugging-General. Follow the steps in the change box.
2. Configure tools-Option-debugging-symbols as follows:
Summary: This is not bad. In this way, you can refer to and learn the source code of. Net framework4.0 during normal debugging. You can also find out program problems more easily.
Refer:
Http://referencesource.microsoft.com/
Step into. NET Framework 4.0 source code