How to debug asp.net core async method using Source Link?

眉间皱痕 提交于 2020-03-19 05:17:12

问题


I am trying to debug asp.net core internals to see what is going on under the hood.

I set up .net core debugging in VS Code according to this article: https://github.com/OmniSharp/omnisharp-vscode/wiki/Debugging-into-the-.NET-Framework-itself

Now I get .net core sources automatically while debugging and can step into methods, but not async ones. Since I have no source code at hand (it loads on the fly from somewhere) I cannot set a breakpoint in an async method to make debugger stop there.

I have the following controller method. How can I step into HttpContext.SignInAsync(...) method in VS Code debugger?

public async Task<IActionResult> Login(LoginModel model)
{
    ...
    await HttpContext.SignInAsync(principal);
    ...
}

Update #1

Same thing for Visual Studio 2019. So it does not matter if I use VS Code or VS 2019.

来源:https://stackoverflow.com/questions/55863506/how-to-debug-asp-net-core-async-method-using-source-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!