How to: Debug .NET Framework Source

Visual Studio 2008 provides new features for .NET Framework debugging.

To configure VS 2008 to debug .NET Framework:

Start Visual Studio 2008 and bring up Tools > Options > Debugging.

Set the following two settings:

  • Turn OFF the "Enable Just My Code" setting
  • Turn ON the "Enable Source Server Support" setting

EnableJustMyCode

Under the Debugging category, click Symbols.

Set the symbol file location to be: http://referencesource.microsoft.com/symbols

specify the cache location > check the "Search the above locations only when symbols are loaded manually" option. Enable the "Search the above locations only when symbols are loaded manually" option.

SymbolsWindow

That’s all, you are ready!

Now all you have to do is start debugging. set a breakpoint somewhere in the code and step into. if it’s .NET code, go to the call stack, In the Call Stack window, right-click a frame for which symbols are not loaded. The frame will be dimmed out.

Point to Load Symbols From and click Microsoft Symbol Servers or Symbol Path.

CallStack

That’s all.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: