Home > Software design >  Debugger in visual studio waits in 9 seconds before starting
Debugger in visual studio waits in 9 seconds before starting

Time:12-11

If I create a .NET console project from scratch (File → New → Project → C# → windows → Console → Console App (.NET Framework) and I debug the following program

using System;

namespace ConsoleApp2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("test");
            Console.ReadLine();
        }
    }
}

using F5

...I will get an empty console window in 9 seconds before the program is running (and the text "test" is echoed).

The delay is the same every time.

Can I change any settings to get rid of the delay? What is Visual Studio doing in 9 seconds?

If I run the program without debugging (Ctrl F5), I do not have the delay, but I really need to debug sometimes.

CodePudding user response:

I have concluded that the delay is introducted in vs2022, so I have to use vs2019 until the problem is fixed!

(Unchecking Options → Debugging → General checkboxes made no difference for me).

The current vs2022 version is 17.0.2.

  • Related