28

Previously this could be done by unchecking "Enable Edit and Continue" under (Project) Properties | Web | Debuggers. This checkbox is not there in Visual Studio 2015 Update 2. The same checkbox including four sub-options can be found in Options | Debugging | General, but unchecking this no longer resolves the issue.

stovroz
  • 6,835
  • 2
  • 48
  • 59
  • 2
    +1 Same here. Although the checkbox wasn't available for me before Update 2, still the behaviour was there. I find myself now using Debug > Start without debugging (Ctrl+F5) as a workaround, but would still be able to "keep running" after a run a normal debug session. – Juliën Apr 04 '16 at 11:13
  • Not a bug - great enhancement. – andrew.fox Apr 15 '16 at 13:28

5 Answers5

12

Same problem here.

My workaround for now is to add "Detach all" shortcut on the toolbar instead of the "stop" button.

Hagay Goshen
  • 599
  • 2
  • 13
  • 1
    Thanks! That is a great solution. Still not sure if this is a bug or "Detach all" has always been the correct way to accomplish this instead of "Stop". Nevertheless, the behavior changed without explanation. Many folks seems to be struggling with this issue. I like leaving IIS Express running during my workflow. – Diego Apr 06 '16 at 01:38
  • Thanks for the suggestion. Unfortunately it's not a great workaround for me as I then need to go through the menus to reattach and and terminate the process before I can rebuild again, because of a lock on a LocalDB. This would have all happened automatically before. So I'm holding out for a happier answer sorry! – stovroz Apr 06 '16 at 13:25
  • For reattaching i am long using https://visualstudiogallery.msdn.microsoft.com/6a667daf-be94-4be5-a92a-71732b8dd60a – Hagay Goshen Apr 10 '16 at 05:41
8

The feature you're looking for is Start without debugging (menu: Debug -> Start Without Debugging or shortcut Ctrl+F5).

If you need to debug this process at any time you can use Attach to Process (menu: Debug -> Attach to Process... or shortcut CTRL+ALT+P). If you stop debugging on the attached process VS won't kill it.

PS. For me the bug you're referring to is a great enhancement (killing the debug process with stop debug command). Sometimes when issexpress hang (on SignalR for instance) and VS couldn't run a new debug session. It forced me to kill the process manually.

andrew.fox
  • 7,435
  • 5
  • 52
  • 75
5

Not a fantastic answer, but a workaround.

  1. Select your Web App in Solution Explorer, then press F4 to see the properties pane. In there, ensure 'Always Start When Debugging' is set to true.
  2. If you have another IIS Express Web App in the same solution, do the same for that.
  3. If you don't have another IIS Express Web App then create a minimal .Net web app without any code using the File New templates and set 'Always Start When Debugging' to true for that too.
  4. Here is the trick, right click on the Web App project in Solution Explorer that you don't want to leave running (the one in step 2 or 3) and select 'Set as StartUp Project'.
  5. Run your solution as usual, you'll get both of your Web Apps running. When you exit, it only detaches and halts the startup project which leaves your main app running.

Obviously a bug if they can leave the other Web App running. But at least this workaround will make debugging a little easier.

Ryan O'Neill
  • 5,410
  • 4
  • 46
  • 69
  • A creative workaround, thanks. And obviously you can put a response redirect from your sacrificial project to your desired start page in the main project. But unfortunately relaunching again afterwards is still a polava as the main project is not terminated and rebuilt automatically. So, tempted as I am the send you the bounty purely for your Horace avatar, I continue to wait in hope. – stovroz Apr 13 '16 at 09:28
2

This bug have been Fixed in Update 3

prime23
  • 3,362
  • 2
  • 36
  • 52
1

Maybe this is not the answer to the OP question, but I use the "view in browser" option to achieve this.

Umberto Manganiello
  • 3,213
  • 9
  • 16
Emanuele Greco
  • 12,551
  • 7
  • 51
  • 70