Debugger stepping out of async ValueTask method simply continues execution of program
#36,240 创建于 2019年6月7日
仓库指标
- 星标
- (20,414 个星标)
- PR 合并指标
- (平均合并 6天 17小时) (30 天内合并 256 个 PR)
描述
VSF_TYPE_MARKDOWN1. Create a .NET (Core) console application with the code below.
- Hit F11 to begin stepping into the program.
- Continue pressing F11 till the program exits.
Expected Each statement and closing curly brace is stepped to.
Actual
At the exiting curly brace of the async ValueTask method, Step Into simply Runs the rest of the program instead of stepping back to the 2 calling methods.
using System;
using System.Threading.Tasks;
namespace StepIntoRepro
{
class Program
{
static void Main(string[] args)
{
StepIntoValueTaskMethod(). Wait();
}
public static async Task StepIntoValueTaskMethod()
{
await DoValueTask(false);
}
private static async ValueTask DoValueTask(bool yield)
{
if (!yield)
{
return;
}
await Task.Yield();
}
}
}
This issue has been moved from https://developercommunity.visualstudio.com/content/problem/591002/debugger-stepping-out-of-async-valuetask-method-si.html VSTS ticketId: 903574 These are the original issue comments:
Visual Studio Feedback System on 6/3/2019, 02:28 AM (4 days ago): We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
These are the original issue solutions: (no solutions)