Releasing the Source Code for the .NET Framework Libraries
page 2 of 4
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 21123/ 47

Integrated Visual Studio 2008 Debugging Support

The final release of VS 2008 will support the ability to configure the debugger to dynamically download the .NET Framework debugger symbols (and corresponding source code) from a web server hosted by Microsoft.  You'll be able to configure the .NET Framework symbols to be downloaded all in one shot, or manually retrieved on demand:

Figure 1

When you debug a .NET application and hit a breakpoint in your code, you'll now be able to see a debugger call stack that contains detailed file and line number information for the .NET Framework classes and methods in your application:

Figure 2

In the screen-shot above, you can see that we've set a debugger breakpoint in my page where we are calling GridView1.DataBind().  Previously there was no way to drill into this DataBind() method to see how it was implemented. 

Now with VS 2008 you'll be able to press F11 ("Step Into") and drill into the .NET Framework source implementation with the debugger:

Figure 3

VS 2008 will include support to automatically retrieve the appropriate .NET Framework source files on demand from Microsoft.  This means that the source code for the ASP.NET GridView and BaseDataBoundControl classes above do not have to already be installed on the machine before we started the debugger.  Instead, when we use F11 to step into their implementation VS can automatically download the source files from Microsoft and open it within the IDE.

By downloading the files dynamically we can also ensure that the matching source files always line-up with the particular version of the .NET Framework on your machine (for example: if you have a GDR or Service Pack Patch installed on your machine, we'll make sure to download the source file that corresponds to it).

In addition to stepping into .NET Framework code, we can also step back up on the call stack into .NET Framework source as well.  For example, in our scenario above I could also double click up the callstack and review the private ProcessRequest method on the System.Web.UI.Page class:

Figure 4

We could optionally also step further up and into the System.Threading.ThreadPool implementation in mscorlib (which controls the thread our Page is scheduled on):

Figure 5

Note in the previous two screen-shots how the VS debugger's "Locals" and "Watch" windows are fully supported within both your code as well as in the .NET Framework source.


View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-26 4:33:41 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search