Debugger in .NET Core 3.1 doesn't show the row of problem when error occurs

  • Thread starter Thread starter Silvers11
  • Start date Start date
S

Silvers11

Guest
Hello!

I have a problem with .NET Core 3.1 Windows Form App application when I debug.

Normally in the .NET Framework application, when an error occurs, the debugger goes to the EXACT line where the problem occurs but the .NET Core 3.1 shows a "ThrowHelper.cs" file with the problem which means that I don't know where the problem occurs.

System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection.

I am not sure how to enable the debugger to work correctly?

private void button1_Click(object sender, EventArgs e)
{
List<String> list1 = new List<String>();
MessageBox.Show(list1[0]);
}

Continue reading...
 
Back
Top