Is there a way to hide the "Source Unavailable" tab when calling "Break All" in Visual Studio 2013 in ASP.NET MVC?

As described in this question Is it possible to edit and continue in Visual Studio 2010 without pausing execution? , Edit and Continue can be used in conjunction with Break. All basically reload the call on the fly.

The problem is that when I call Break All in my ASP.NET MVC application, it displays the β€œNot Working” tab. It would be great if there was a way not to show this tab or just focus on the tab where I call Break All, so that I can go straight with my changes.

Most of the solutions that I found on the Internet suggest using Ctrl - but this does not work on this tab. The only way I found is to use Ctrl F4 to close it, but that is not the case. This might be caused by ASP.NET or Visual Studio 2013, but there seems to be no good way to do this right now.

How do you guys reload your code while working on ASP.NET MVC? Do you use Debug and Continue? And if so, is there a way to disable this annoying popup tab? Or should I just disable Edit and Continue at all?

+1
source share
1 answer

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.

+1
source

Source: https://habr.com/ru/post/1502117/


All Articles