Wednesday, September 15, 2010

How to Debug .NET Framework Source Code

In this blog post I am going to show how to setup VS.NET Environment to step into .NET Framework source code. To do this exercise let us create small VS.NET Application and add some code which uses any of the .NET Framework Library Functions here I am using LINQ.  

 

image

This below source code just returns the even numbers from integer array and prints into Console .

image

Right click on the project and make sure you uncheck the  Enable the Visual Studio hosting process option as shown below.

image

Now go to Tools option from main menu and select Options as shown below.

image

Now set the options as shown below.

image

 

image

Now press F11 and debug the app. ( First time you can see the Dialog windows which shows downloading the .NET Framework Symbol )

image

When I hover over evennumbers variable I could able to see the source code life for that  as shown above. Now we are able to debug the .NET Framework source code same we do with our Custom code.

Nandri(Thanks)

SreenivasaRagavan.

No comments: