Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stop development server when i stop debugging

How can automatically I stop the development web server when I stop debugging in Visual Studio?

like image 856
Hannoun Yassir Avatar asked Aug 26 '09 14:08

Hannoun Yassir


Video Answer


2 Answers

Workaround: Debugging Global.aspx.cs Application_Start() with ASP.Net Web Server within Visual Studio

Enabling "Edit & Continue" on the web server project worked for me. It doesnt shutdown cassini when you stop debugging, but it does restart cassini when you start debugging.

like image 100
mat3 Avatar answered Sep 24 '22 01:09

mat3


There is no way to get the Asp.Net development service to automatically stop when you hit the "stop debugging" button, as all that does is detach the debugger. You could however explicitly kill the process yourself (which would in turn cause VS to stop debugging).

This question shows how you might do this in a Macro:

Automatically stop/restart ASP.NET Development Server on Build

Alternatively take a look at mat3's answer on how you can force the development server to restart every time you start debugging (although it will still remain running after you have finished your debugging session until you next run your probject).

like image 41
Justin Avatar answered Sep 24 '22 01:09

Justin