Visual Studio 2017 leaves browser open - c#

In VS2015 and earlier, when you started debugging a web application or site, it opened IE (or edge) or even chrome to view and test your project. When you closed the browser, the debugger would stop and when you stopped debugging the browser would close. In VS2017, this behavior does not happen. I find myself leaving tons of browser windows open all over the place. I would much prefer if it would simply behave as it did in VS2015 and clean up after itself.
I am sure there is a reason for this but I cannot fathom it. Is there a way to get this behavior in VS2017?

It is not a bug/issue this is a feature you can disable by inside Debug -> Options you can disable it now.

Related

How to prevent MS Edge DevTools from stopping Visual Studio .NET MVC Application?

Closing MS Edge DevTools stops a running Visual Studio web project. How do I prevent this?
I have a .NET MVC app that I am developing. For local testing and debugging I run the web project from Visual Studio using IIS Express. (Visual Studio Pro 2017 v.15.9.5)
It is not uncommon for me to open the Edge DevTools (F12) to inspect JS or CSS. The problem is that once the DevTools window is open if the DevTools are closed or even the web page is refreshed it causes Visual Studio to stop running/debugging the web application.
I have tried uninstalling the TelemetryCorrelation NuGet package (& its dependencies) from the project. I have made sure that the following configurations are unchecked in VS.
(unchecked) Enable Diagnostic Tools while debugging
(unchecked) Automatically close the console when debugging
(unchecked) Enable Edge Developers Tools for WUP JavaScript Apps (Chrome, Edge, and IE)
Using a different browser is not a solid option for me. I am writing an internal application and Edge is the "company supported" browser so I need to develop and debug with the same browsers my users will use.
EDIT before confirming as duplicate:
Although my issue was the opposite from the debugger closing the browser, the same configuration changes fixed my issue. Weirdly the behavior I have reported was ONLY in Edge, not in FF or IE. I was not having the opposite issues, stopping the debugger did not close the browser.
I was overlooking the "Stop debugger when browser window is closed, close browser when debugging stops" configuration b/c I was looking under the "Debugging" configuration heading, not "Projects and Solutions".
My solution was to uncheck the "Stop debugger when browser window is closed, close browser when debugging stops" configuration in Visual Studio.
I was overlooking that configuration because I was looking under the "Debugging" configuration heading, not "Projects and Solutions".

Visual Studio does not close IE window (and vice versa)

Hopefully this is the correct place to ask but I have an unusual issue. I have Visual Studio 2017 (community). I find that when I start debugging an asp.net project, it opens IE correctly but when I stop debugging it does not close the IE window. Conversely when I close the IE window it does not stop debugging.
Debugging is working so they are communicating with each other.
Any ideas why this might be happening? Windows 10. Thanks!

Memory leak with Visual Studio running alongside web application

I'm running a web application with models defined in C# and views being in HTML5, client-side business logic is JavaScript/jQuery. I've noticed something odd recently. Whenever both Visual Studio and my web application are running simultaneously, the browser memory usage starts to climb. It is worse in IE and Chrome, but likewise substantial in Firefox (all the latest versions of these browsers). Also, the memory usage of Visual Studio starts to climb. The CPU usage for the browser hovers in the teens, normally hovering around 0 otherwise.
Once I close down either the web application, or Visual Studio, the memory stops growing, and indeed, closing Visual Studio often allows the browser to run its garbage collection and clean up the mess. I suspect this has something to do with some sort of background debugging going on. I'm surprised that googling this hasn't turned up a similar issue for somebody somewhere in the world, and I suspect it's some kind of configuration setting in my IDE. Visual Studio 2013 Premium. I've reset my settings (Tools -> Import and Export Settings -> Reset all settings, with no effect. Building in Release mode likewise seems to have no effect. I'll keep hunting this one down, but has anyone here seen anything like this and resolved it?
edit: I have recently been debugging some dynamic code using the debugger keyword. I've commented that out, and am still seeing the same results. But I wonder if there isn't some lingering effect from using this in the first place?
edit: Updating Resharper from 8.2 to 9.2 didn't help either.
edit: Apparently this issue has been seen before and reported, if you just know what to google for.
Visual Studio has a browser link feature that causes the web app to poll Visual Studio in case you have changed a file.
In VS there is a small refresh icon in the debug menu with a drop down. In there you can disable this feature.
Did you trying running the application without debugging? (Ctrl+F5)
To enable VS debug the browser more info is needed specifically things like scripts and eval code are needed even after use. So, running the browser with debugging enabled will use more memory and cause memory to grow with time.

mvc debugging with internet explorer

I had to reload my computer and I was able to choose what browser I was able to test my MVC application in Visual Studio 2013 but it seems that I am missing something.
This is the option I had before:
And now I do not have that option:
I have to change my default browser back and forth for this to work and that is a pain.
Anyone know what I am missing?
IN RESPONSE TO bto.rdz
I'm not given any browser options when I click the arrow:
I went and checked my Visual Studio 2013 and was surprised that mine was doing the same thing. I only had the start option. I investigated the standard menu and after a little guess work I figured out what happened. Right click your web project in your solution. then select it as the start up application. As soon as I did that I got my browser choices back.

Stop debugging Visual Studio 2013 when browser closes

How can I automatically stop debugging Visual Studio 2013 when I close the browser window?
Only Internet Explorer can do this, as it's both a Microsoft product. Since Chrome has no direct access to Visual Studio it would be weird if Chrome could cut down the IIS process which is running on your PC.
If you like to see the "Stop debug behavior" you should use Internet Explorer as debug browser.
Aware this is an old thread, but adding because this came up for me first trying to work out why VS2015 wouldn't stop debugging when I closed Internet Explorer. Turns out, being 64-bit, is had picked the x86 version of IE to browse with and of course I never noticed the difference. When I went to "Browse with", there was "Internet Explorer (2)" there, which was the 64-bit version. That stopped debugging fine when I closed IE. When I went back in to Browse With, the original X86 one was gone.
Presume because this was an old project that had the x86 association saved.

Categories