When debugging a console app, Visual Studio gets stuck in an exception-reporting loop. Why?

后端 未结 4 1384
野趣味
野趣味 2021-01-21 04:08

Consider this simple console application:

using System;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            t         


        
4条回答
  •  被撕碎了的回忆
    2021-01-21 04:51

    It doesn't do that. If the application wasn't running in the debugger, you'd get an "application quit unexpectedly" dialog - but not in Visual Studio.

    While I'm not exactly sure why it behaves like that, it may be because it gives you the option to move the "currently executing line" arrow (the yellow array) to the next line that should be executed and to resume operation.

    Otherwise, yes, you need to stop the application explicitly.

提交回复
热议问题