VS2019 16.4.5 error handling IndexOutOfRangeException non informative

  • Thread starter Thread starter TimidWriter
  • Start date Start date
T

TimidWriter

Guest
Hello,

In VS2019 (Community) the seems to be lacking compared to VS2012 (Pro). I get the following error in VS2019:

>> Your app has entered a break state, but there is no code to show because all threads were executing external code (typically system or framework code).

It was caused by trying to array an empty string. Example of code:


tring line = "";
if (line[0] == '0') {
Console.WriteLine("Example");
}


Image below is the error page I got that really tells me little. eTCFeMg.png

Compare it to the way VS2012 handled the error

N2UUXJ3.png

Album: View: https://imgur.com/a/fjaoTya


In VS2019, it would have taken me a while to figure out the simple cause. In 2012 it was straight away. Not sure why the handling is different. I have checked all "Common Language Runtime Exceptions".

Is there a way to fix this issue

Thanks


Please mark the post that answers your question and also use the vote UP button for helpful replies.

Continue reading...
 
Back
Top