Blog Archive

 

 About this blog

 
About this blog 
Your Name 
Course-Schedule

Daniel A. Seara

Debugging the .Net Framework code with your own

2008-01-23 12:59:00 by Daniel A. Seara

In October 2007, Scott Guthrie announced the future possibility to debug Microsoft internal .Net Framework code from Visual Studio 2008.

This option is available now, following these steps.

Note: I am not a Genius; I am just explaining what they told me J

The first step is to install the Hot Fix to have this option available

Then, open Visual Studio and go to Tools – Options; and change the configuration like this image

Then go to the Symbols options and add the following symbol location: http://referencesource.microsoft.com/symbols

Add a local cache directory

Ensure you have disable the Search the above location only when symbols are loaded manually (this is a tip I added J )

In addition, enable the load symbols…. (Notice this take some time the first time).

When you click Ok, John Security will give you a dialog gift (and that is always welcome!)

Then you are ready to debug!

As an example, this routine loads subfolders in a tree view when a node (which point to a drive) is expanded

We just need to add a breakpoint

Start the execution, and when we hit the breakpoint, click in the Step Into button

Then we will be at the .Net Framework code

(You can be sure about that because

  1. Usually I try to not write c# code
  2. The comments are in English and usually I comment in Spanish except when I write code to publish here J)

A final tip:

Once you have debugged at least one time, uncheck the reference to http://referencesource.microsoft.com/symbols

This will make Visual Studio work faster … but remember to re load them from time to time (just in case someone change somethingJ!).

Comments

No Comments
Leave a Comment
(*) Title:
(*) Name:
Your URL:
(*) Comments:
Follow us on: