Debugging async methods
Answered
Given this code:
class Program
{
static async Task Main(string[] args)
{
int contextVariable = 1;
await Task.Delay(100);
int contextVariable2 = 2;
await Task.Delay(100);
ThrowException();
Console.WriteLine("Hello World!");
}
static void ThrowException()
{
throw new Exception();
}
}
There is no way to see the value of `contextVariable` and `contextVariable2` after the exception is thrown. This is normally possible without async methods.
Please sign in to leave a comment.
This problem doesn't exist in Visual Studio.
Also I found this relating issue on issue tracker:
https://youtrack.jetbrains.com/issue/RIDER-28264
I wonder why Jetbrains doesn't fix these important issues after 9 MONTH.
What is more important than debugging in an IDE?
Hi,
Thank you for the request and the sample code.
I will draw developers' attention to this issue.
Kind regards,
Sofia.