在这篇Post中,我将演示如何配制Visual Studio2008来调试.net framework source code.

打开Tools—>Options—>Debugging

反选Enable Just My Code (Managed only)

framework-source-debugging-01

明显我们要选中Enable .NET Framework source stepping  选项

framework-source-debugging-02

Vs2008 sp1 需要知道我们在哪儿能访问source code,所以要选中Enable source server support 选项:

framework-source-debugging-03

然后配制symbols的locations以及本地cache目录:

framework-source-debugging-04

接着让你确认 Source Server 是有效的:

framework-source-debugging-05

让我们来建一个控制台的项目测试下:

framework-source-debugging-06

写一个Console.WriteLine的方法:

framework-source-debugging-08

此时VS会下载Symbols。

framework-source-debugging-09

看效果,断点停了,我们按F11进入内部

framework-source-debugging-10

framework-source-debugging-11

是不是很简单。希望这篇POST对你有帮助。

Author: Petter Liu     http://wintersun.cnblogs.com

posted on 2009-09-11 19:29  PetterLiu  阅读(703)  评论(2编辑  收藏  举报