如何调试 .Net Core 或基类库 (coreFx) 的源代码? [英] How can I debug the source code of .Net Core or the Base class libraries (coreFx)?

查看:18
本文介绍了如何调试 .Net Core 或基类库 (coreFx) 的源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 .NET Core 1.0Visual Studio 2015 Update 3 来制作一个简单的 Asp.Net Core MVC 网站.

如何调试我的应用程序并步入".NET Core 要启用源链接支持,只需禁用启用仅我的代码和启用启用源链接支持.然后启用 Microsoft 符号服务器.

<小时>

Victors 的回答在 vs 2015 中效果很好.对于正在寻找 vs 2017 解决方案的人来说,
在 vs 2017 中没有 global.json 可用.所以不是在 global.json 中添加文件夹路径,而是必须添加和重建项目引用.
Victors 文章中提到的所有其他内容都与 2015 年相同.
重要的是 git hub 标签和 nuget 包匹配具有相同的版本.

I am using .NET Core 1.0 and Visual Studio 2015 Update 3 to make a simple Asp.Net Core MVC website.

How can I debug my application and "Step Into" the .NET Core source code that is available on GitHub?

Specifically, I am trying to troubleshoot one issue with Microsoft.AspNetCore.Authentication.Facebook 1.0.0 assembly that I fetched from NuGet.

解决方案

Update to fit new VS 2017

In Visual Studio 2017 15.3.5 and later We can use SourceLink support for debugging .NET Core and ASP.NET Core sources. To enable source link support just Disable Enable Just My Code and and Enable Enable Source Link Support. Then Enable Microsoft symbol servers.


Victors answers works well with vs 2015.For some one who is looking for a solution with vs 2017,
In vs 2017 there is no global.json availble.So instead of adding folder path in global.json a project reference has to be added and rebuild.
All the others mentioned in Victors article works same as with 2015.
It is important that the git hub tag and the nuget package matches have the same versions.

这篇关于如何调试 .Net Core 或基类库 (coreFx) 的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆