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

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!

Related

Need to restart Visual Studio 2017 for IIS to work

I'm developing a site with .NET and C# in Visual Studio 2017. When I first load the project, I can press the green arrow IIS Express button and it opens a new browser window and everything is fine. However if I stop it or exit from the browser tab, the next time it doesn't load the page. It opens the browser window, but says it cannot connect, and the IIS Express button doesn't stay grey and goes back to white. This started happening only recently, and I've not made considerable changes to the codebase; I don't know why this is happening now.
All I have to do is exit Visual Studio and open it up again, then I can run IIS Express for one time before it stops working again.
I don't see any errors, I've tried running in Administrator mode, and I've assured that it's not trying to use a port that's already in use. I've also tried updating VS 2017.
Where do I start looking into this problem?
According to your description, I guess you may install some third-party extension in your visual stuido that casuing this issue.
I suggest you could try to ​​​​​​run VS with safe mode to check if this is working well or not.
About how to run VS in safe mode, you could refe to below way:
open CMD and go to C:\Program Files (x86)\Microsoft Visual Studio\2019\version name\Common7\IDE folder, run the command: devenv /safemode
Besides, I suggest you could try to reset all the VS setting to defauly.
Details, you could refer to this article.

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 2017 leaves browser open

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.

Debug mode of Visual Studio 2010 is not running well

I've problem in my Visual Studio 2010 Ultimate version. When I push play button on my project and the browser (IE) is appear and suddenly the play button is not gray out and in a debug mode position. It's back to normal mode as I'm not pressing the button play yet. Please help and advice the solution. Attached image for the illustration.
Thanks in advance.
http://i.stack.imgur.com/0XPJM.png
something makes your program exit.
perhaps exception.
start debugging using F11 (step into).
and and go slowly until you find the reason.
also you can use
Visual Studio: How to break on handled exceptions?

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