I cannot view debug information when using Task of Tuple. EG. When a breakpoint hits it, I cannot view any variables on hover, in a local window or in a viewport.
Reproduction is simply to create a new WPF application, add System.ValueTuple, add this code to MainWindow.xaml.cs, and then set breakpoints on both lines using "return".
using System.Threading.Tasks;
using System.Windows;
namespace WpfApp2
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private async void Button_Click(object sender, RoutedEventArgs e)
{
var task1 = TaskWithLocalDebugInfo();
var task2 = TaskWithoutLocalDebugInfo();
}
private async Task<bool> TaskWithLocalDebugInfo()
{
var viewableInLocalWindowAndHover = true;
return viewableInLocalWindowAndHover;
}
private async Task<(bool, bool)> TaskWithoutLocalDebugInfo()
{
var notViewableInLocalWindowAndHover = true;
return (notViewableInLocalWindowAndHover, notViewableInLocalWindowAndHover);
}
}
}
Edit: if I add an unviewable local variable to view, I get: error CS8182: Predefined type 'ValueTuple`2' must be a struct.
source
share