Back to Technical Posts
.NET Framework Debugging

Microsoft Releases .NET Framework Source Code for Debugging

Microsoft just published the complete .NET Framework source code through the Reference Source Center, enabling developers to step through framework code during debugging in Visual Studio 2008. A groundbreaking example of Software + Services architecture.

The Announcement

In January 2008, Microsoft made all .NET Framework source code publicly available through their Reference Source service. This represented a major shift in Microsoft's approach to transparency and developer tooling.

Software + Services Architecture

This release exemplified Microsoft's "Software + Services" strategy:

  • • Client software: Visual Studio 2008 debugger
  • • Service provider: Microsoft Reference Source Center at referencesource.microsoft.com
  • • Seamless integration: VS2008 downloads source files on-demand during debugging
  • • Symbol server: PDB files served from Microsoft's symbol server

Why This Matters

Learning from the Masters

One of the best practices for becoming a great programmer is reading lots of code. What better code to explore than the .NET Framework itself?

  • • Step through framework methods: Understand exactly how System.String, List<T>, or LINQ work
  • • Learn design patterns: See how Microsoft architects solved complex problems
  • • Debug deeper: Trace bugs into framework code instead of hitting black boxes
  • • Performance insights: Understand framework overhead and optimization techniques

Configuring Visual Studio 2008

To enable .NET Framework source debugging in Visual Studio 2008, follow these configuration steps:

Step 1: Enable Source Server Support

In Visual Studio 2008:

Tools → Options → Debugging → General
☑ Enable .NET Framework source stepping
☑ Enable source server support

Step 2: Disable "Just My Code"

Still in Debugging → General:

☐ Enable Just My Code (uncheck this)

This allows the debugger to step into framework code instead of treating it as external.

Step 3: Configure Symbol Server

Navigate to:

Tools → Options → Debugging → Symbols

Add symbol file location:
http://referencesource.microsoft.com/symbols

Cache symbols in: C:\Symbols (or your preferred location)

Step 4: Start Debugging!

Now when you debug and hit framework methods, Visual Studio will:

  1. 1. Download PDB symbol files from Microsoft's server
  2. 2. Retrieve the corresponding source files
  3. 3. Allow you to step through the actual framework code
  4. 4. Cache everything locally for future sessions

What You Can Explore

Core Libraries

  • • System.String methods
  • • Collection implementations
  • • LINQ operators
  • • Thread synchronization
  • • Reflection internals

Framework Components

  • • ASP.NET page lifecycle
  • • WCF channel stacks
  • • WPF rendering
  • • Entity Framework queries
  • • Serialization logic

Modern Evolution: Open Source .NET

The 2008 Reference Source release was just the beginning. Microsoft's journey toward transparency continued:

2014 - .NET Core Open Source:
Microsoft open-sourced .NET Core, CoreFX, and CoreCLR on GitHub under MIT license
2016 - .NET Foundation:
Independent foundation to support open-source .NET ecosystem
2019 - .NET 5 Unification:
Unified platform bringing together .NET Core, Mono, and Xamarin
2024 - GitHub Native Development:
All .NET development happens in public on GitHub with community contributions

Today: Exploring .NET Source Code

Modern Options

  • GitHub Repository: Browse source at github.com/dotnet/runtime
  • Source Link: VS 2019+ automatically downloads exact source matching your NuGet packages
  • Reference Source: Still available at referencesource.microsoft.com (for .NET Framework 4.8 and earlier)
  • Community Contributions: Submit PRs to fix bugs or improve .NET itself

Visual Studio 2022 Setup

Tools → Options → Debugging → General
☑ Enable Source Link support
☑ Enable source server support
☐ Enable Just My Code (uncheck)

Source Link automatically maps compiled code to exact GitHub commits!

Key Takeaways

1. 2008 was transformative - Reference Source Center enabled framework debugging
2. Read great code to write great code - .NET Framework is a masterclass
3. Software + Services model - VS2008 + Symbol Server = seamless experience
4. Full open source today - .NET is now developed entirely in public on GitHub
5. Source Link is magic - Modern debugging automatically finds exact source

Related reading

More in the Digest — a weekly roundup of AI and agents news — or start with AI Strategy.