Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop browser closing automatically when you stop debugging on VS 2017

I'm trying out the new VS 2017 RC and wondering if anyone knows how to get the previous debugging behavior back

In VS 2015 it went like this:

Press start debugging

  • Website opens in new Chrome tab
  • Press stop debugging
  • Website is still open and the site is still running/active

Now in 2017:

  • Press start debugging
  • Website opens in new window that can't dock with any other Chrome windows/tabs
  • Press stop debugging
  • Website/Chrome window closes, can't continue using the site unless I manually go to the localhost window in Chrome

Is it possible in 2017 to switch back to the 2015 style? So the Chrome/Website window can dock with other Chrome windows/tabs, and it stays open after you stop debugging?

Additionally, I find the new Chrome window frustrating to use, as it seems not to have any history/content available. E.g I can't autocomplete forms or urls, which is very annoying when I'm trying to test a form

like image 260
mejobloggs Avatar asked Nov 21 '16 21:11

mejobloggs


People also ask

How do I stop debugging in Visual Studio 2017?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.

How do I keep debugging in Visual Studio?

In most languages supported by Visual Studio, you can edit your code in the middle of a debugging session and continue debugging. To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press F5, F10, or F11 to continue debugging.

How do I stop chrome script debugging in Visual Studio is enabled?

Tools > Options > Debugging > Just-In-Time > Uncheck Script Option.

What does stop debugging do?

Debug | Stop Debugging Click Stop Debugging on the Debug menu to stop the target's execution and end the target process and all its threads. This action enables you to start to debug a different target application.


Video Answer


1 Answers

Visual Studio 2017 version 15.7 and higher & Visual Studio 2019 changed things again.

Disabling the following checkboxes will allow you to keep the browser open (doesn't close after stop debugging) and opens another tab (instead of another window):

enter image description here

enter image description here

Tools > Options > Debugging > General

  • Disable "Enable JavaScript debugging for ASP.NET (Chrome, Edge and IE)".

Tools > Options > Projects and Solutions > Web Projects

  • (Visual Studio 2017) Disable "Stop debugger when browser window is closed".
  • (Visual Studio 2019) Disable "Stop debugger when browser window is closed, close browser when debugging stops".
like image 115
jerone Avatar answered Nov 18 '22 14:11

jerone