ASP.NET MVC differs from traditional .exe at design time because each web request is essentially a clean run through the stack. Therefore, you really do not need your application to run in the visual studio if you are not trying to control the call stack on a particular function call.
In most situations, you make changes and then check for these changes in the browser through IIS Express. If you launch your application using CTRL + F5 , it starts the IIS Express process using your current .DLL in the bin / debug directory, but leaves the visual studio in edit mode. If you make changes to your code and then compile with F6 , the .DLL in the bin directory will be updated, and the next browser request made in IIS express will use the new code base. You can constantly use F5 in the browser, monitor the results, make changes, recompile, etc., without breaking the workflow.
You only need to start Visual Studio in debug mode if you are actively trying to debug a method call and need to set breakpoints in the server code. Making changes to razor views, adding new controllers / actions, etc. Usually does not require debugging. And in many cases, simply using the console list or other visual cues in your HTML / Razor can be used to track the states of variables and further prevent the need to rely on server debugging.
CTRL + F5 starts by default without debugging, which will lead to the appearance of a copy of IIS express in the system panel and launch the browser. even if you close the browser window, the IIS express instance will work in the tray until you close the visual studio. F6 is just recompiling the current code and will only lead to a quick message about the completion of the assembly. Although IIS Express is active in the system tray, several instances of the browser can send requests to the port that is assigned to this server, without having to do anything else in Visual Studio. Recompiling the code does not affect the current status of all browser instances that are currently open, but immediately affects any future actions taken from any browser window.
source share