We can keep the Visual Studio debugger enabled, even when the project’s output browser is closed. When we work with web projects, as soon as we close the web browser window, Visual Studio stops the debugger. During this time, you may want to review old debugging data or other traces. However, when you close the browser, Visual Studio stops the debugging session. Usually this can happen as expected, however, in some cases we want the debugging session to be active or continue debugging. Well, Visual Studio allows us to control that. Let’s see how we can achieve this.
Check more tips…
Keep Visual Studio debugger ON / OFF
- Open the Visual Studio Option Dialog Window.
- Search for Web Projects options, and you will find “Stop debugger when browser is closed“

Related Tips: 10 Effective Debugging Tips for .NET Developer
If the “Stop debugger when closing browser” box is checked, Visual Studio will terminate the debugger as soon as you close the browser. When unchecked, Visual Studio will continue running the debugging session. As long as the debugging session is enabled, you can open your web project in the browser and restart debugging your application.
You can check more article on our website under C# section HERE or you can also check same on Microsoft Docs too.