188

Previously in 2012, if I debugged in Chrome (for example), and then stopped the debugger, the website would remain running in IIS Express. This no longer seems to be the case in 2013.

Is this a new change that I need to make? How can I keep the website instance running even after I stop the debugger? Thanks.

Ryan Peters
  • 7,608
  • 8
  • 41
  • 57

3 Answers3

308

Turning off the new "Enable Edit and Continue" feature fixed it for me.

  1. Open Options dialog box (Tools | Options)
  2. Locate "Debugging\Edit and Continue"
  3. Uncheck "Enable Edit and Continue"

Update 1:
You can also turn it off on a per project basis.

  1. Open properties for web project
  2. Select Web tab
  3. Uncheck "Enable Edit and Continue" in the "Debuggers" section

Update 2: Blog article that discusses this feature.

“Enable Edit and Continue” debugging option is now on by default for new web applications in VS2013 preview

Callum Watkins
  • 2,844
  • 4
  • 29
  • 49
Rick
  • 5,029
  • 2
  • 33
  • 34
  • 4
    But if you disable *Edit and Continue* then you can't edit code while debugging! – Josh M. Jan 30 '15 at 14:09
  • 3
    Edit and continue? Yes, it's a huge time saver. If you're not using *edit and continue*, you're doing it wrong! ;-) – Josh M. Feb 12 '15 at 02:08
  • *Edit and Continue* is useful when debugging and testing web projects. That *.aspx files can be edited, the browser refreshed, and changes will appear. It's not so useful for non-web code... – Zarepheth Jul 09 '15 at 21:11
  • so if you have your logic in another file, or even in another library it is useless? – Adam Heeg Jul 27 '15 at 14:06
  • If you need edit and continue in a web project you are doing it wrong. You shouldn't be testing your code by debugging. You should have tests than are easy to start and stop! :) – JRadness May 23 '16 at 16:37
  • not working in Visual Studio Community 2015 Update 2. I have done the needful and IISExpress still stops midway – sohaiby Jun 13 '16 at 05:51
20

Easier solution:

From Debug menu select Start Without Debugging or Ctrl+F5 to run the project, it will keep running your project unless you quit IIS.

Mostafiz Rahman
  • 8,169
  • 7
  • 57
  • 74
11

I didn't have "Enable Edit and Continue" in my web project's properties (VS2015 Community Update 2), but finally I found a useful comment in this link which mentioned in Rick's answer:

Christian: You don't need to turn the option off for IIS express to keep running. All you need to do is instead of stopping your application, detach all processes. If you go: Tools > Customize > click the commands tab. Then select toolbar radio button and on the drop down next to this select debug. You then want to "Add Command…". On Add Command window select debug and scroll down to and click on "Detach All". Click OK and then just close. You will see a red cross next to your debug menu. When you click this after debugging your application IIS Express will continue to run.

Briefly:
Setting Detach All debugger for vs2015

Community
  • 1
  • 1
Bruce
  • 2,146
  • 2
  • 26
  • 22